Opened 3 years ago

Last modified 3 years ago

#1167 new defect

Increase select timeout to avoid waking up 150 times before doing any work

Reported by: holger Owned by: ligne
Priority: low Milestone: Munin 2.2
Component: node Version: devel
Severity: normal Keywords:
Cc:

Description (last modified by ligne)

Bug#652364: munin-node: Increase select timeout to avoid waking up 150 times before doing any work

From: Petter Reinholdtsen <pere@hungry.com>

Package: munin-node
Version: 1.4.5-3
Severity: minor

When running strace on munin-node to try to debug connection problems,
I noticed this on a idle node:

select(8, [5], NULL, NULL, {2, 0})      = 0 (Timeout)
select(8, [5], NULL, NULL, {2, 0})      = 0 (Timeout)
select(8, [5], NULL, NULL, {2, 0})      = 0 (Timeout)
select(8, [5], NULL, NULL, {2, 0})      = 0 (Timeout)

The process wake up every two seconds to do nothing and continue
waiting for a connection.  This means it wake up 150 times before the
munin server connect every 5 minutes.  Please change this timeout to
at least 5 minutes, to save some power by not activating the CPU
unless there is work to do.  I suspect it can be a lot higher than 300
seconds without any problems, so consider increasing it to 30 minutes
or an hour. :)
-- 
Happy hacking
Petter Reinholdtsen

Change History (4)

comment:1 Changed 3 years ago by holger

/me likes to run munin-node on his laptop and would like to see this fixed too ;)

comment:2 Changed 3 years ago by holger

  • Version changed from 1.4.5 to 2.0-beta4

From: Petter Reinholdtsen <pere@…>

Could you maybe have a look at munin 2.0 beta5 (aka1.999.4508-1) in
experimental and see if this bug still applies?

I've verified that the problem also exist in munin-node version
1.999.4508-1 by installing the package in Squeeze and using strace on
the running process.

comment:3 follow-up: Changed 3 years ago by ligne

  • Description modified (diff)

i've not had a chance to look in any great detail, but this is almost certainly due to code in Net::Server. (munin-node itself doesn't really do any looping while waiting -- it's just blocks of code that gets run whenever a connection is established.)

you're both right that this would be a nice thing to fix though. i'll see what i can come up with over the holidays.

comment:4 in reply to: ↑ 3 Changed 3 years ago by snide

  • Milestone changed from Munin 2.0 to Munin 2.1
  • Owner changed from nobody to ligne
  • Priority changed from normal to low
  • Version changed from 2.0-beta4 to trunk

Replying to ligne:

but this is almost certainly due to code in Net::Server.

Line 189 of /usr/share/perl5/Net/Server/Fork.pm from libnet-server-perl (0.97-1)

Therefore :

  • pushing it to 2.1
  • low priority
  • assigning it to you ;-)
Note: See TracTickets for help on using tickets.