150 perl and cron processes spawn at startup

4 posts / 0 new
Last post
#1 Mon, 09/03/2007 - 06:42

150 perl and cron processes spawn at startup


maybe you would know why this is happening!?

After startup I get about 100-150 "perl" and just as many "cron" processes to spawn.

They are all about the same size:

perl 31 MB !!!! cron - 372KB

Just had a look at Webmins "Running Processes" because it is much more detailed then the one in OSX and this is what I see:

... 29063 root /usr/sbin/cron 29066 root /usr/bin/perl /usr/local/webmin-1.351/virtual-server/bw.pl 29669 root /usr/sbin/cron 29672 root /usr/bin/perl /usr/local/webmin-1.351/virtual-server/bw.pl 29981 root /usr/sbin/cron 29987 root /usr/bin/perl /usr/local/webmin-1.351/virtual-server/bw.pl ...

and that about 100 times!? Any idea why? Looks like a leak to me..!?

Tony<br><br>Post edited by: tony.p, at: 2007/09/03 09:29

Tue, 09/04/2007 - 23:23
Joe's picture

How many domains do you have? bw.pl might be one of the processes that runs once per domain (I don't know off-hand, but it seems likely). Bandwidth processing is a quite heavy-weight process, as it analyzes logs for every service for each domain.

They aren't quite as scary on memory usage as it seems at first blush--Perl processes are weighted heavily towards shared libraries, and so only a few MB per process is actually unique and unshared (shared libraries only exist once in memory, ideally).

If it's causing a performance problem, you could disable bandwidth monitoring for some or all domains. There's not a lot to be done to make it less demanding...possibly rewriting it as a compiled application, but perl isn't exactly inefficient at text processing tasks, so all we could do is shave a bit of memory usage off of it (admittedly maybe quite a bit), but since most of it is shared, it wouldn't save more than maybe 50 MB total depending on how many domains you have. CPU usage probably wouldn't be impacted by a dramatic amount.

Of course, if these processes are running for a very long time or seem to be hung, there might be something wrong.


Check out the forum guidelines!

Thu, 09/06/2007 - 09:52 (Reply to #2)

Hi Joe,

well I only have 3 domains so far running on this box. *URGS* ;)

I get this message in Webmin -&gt; Bandwidth Monitoring Module [even after clicking the update button]: &quot;No traffic has been summarized by this module yet. If you have just set it up, it may take at least one hour for traffic to be processed.&quot; I turned this off now..

Bandwidth monitoring in the Module in VMPro is turned off now as well but processes are still ALL there. Will try restart when I get a chance and see if they are coming back...


ps: Would be great if you could find out what exactly bw.pl does and how I can control this madness, because of my 8GB ram is not much left... :[

Thu, 09/06/2007 - 10:42 (Reply to #3)
Joe's picture

Ah, you don't have log rotation setup. ;-)

Those processes run on the logs every day, and if the logs keep growing, it'll keep taking longer and longer to run.

If logrotate exists on the system, and is configured correctly in the Webmin Log Rotate module, Virtualmin will manage the log rotation for you (it might even be able to do it without logrotate, but I don't know for sure--it's been ages since we've dealt with this low-level stuff, since it's been so long abstracted away on the Linux platforms). ;-)

In the meantime, get rid of all of the old log files and start fresh. bw.pl processes the webserver access_log, the maillog, the ProFTPd access log, and probably some others that I'm not thinking of.

If, when the log files have been shrunken to something manageable, the bw.pl processes continue to eat your box alive, file a bug, and we'll see what Jamie has to add to the issue. He has a Mac, but Virtualmin is not heavily tested there.


Check out the forum guidelines!

Topic locked