Welcome, Guest
Please Login or Register.
Lost Password?
bw.pl up to 100% cpu usage for 20 min (1 viewing)
Post Reply

TOPIC: bw.pl up to 100% cpu usage for 20 min

#12406
kgit (User)
Posts: 5
graphgraph
bw.pl up to 100% cpu usage for 20 min 2008/05/11 07:55  
Hi,

Our bw.pl is taking up to 100% CPU usage for about 20 minutes each hour. This slows down the entire machine. I don't think this is normal.

Is this maybe a know issue? What can I do about it? I've already used nice to to make the impact less on the rest of the system.

Some information:

Virtualmin 3.56 (Pro)
Upgrade from 2.609
Linux CentOS 5.1
AMD Dual-Core AMD Opteron(tm) Processor 2214 HE stepping 02

If more information is needed please let me know.

Thanks.
  The administrator has disabled public write access.
#12636
kgit (User)
Posts: 5
graphgraph
Re:bw.pl up to 100% cpu usage for 20 min 2008/05/17 00:36  
Any ideas?
  The administrator has disabled public write access.
#12648
Joe (Admin)
Posts: 3642
graph
Re:bw.pl up to 100% cpu usage for 20 min 2008/05/17 13:24  
It isn't a known issue. There have been some bw.pl performance bugs in the very distant past...but not in at least a year.

However, bandwidth reporting is a very resource intensive task--it's adding up every packet that enters and leaves your box (and every web page and email and whatever else could be hundreds or thousands of packets). That said, you've got a big box, so it shouldn't be taking more than a minute or so on each run.

Maybe the old bw.pl script is sticking around from the 2.609 version? I dunno...maybe check to be sure the script that is being called is actually the current version of bw.pl. I'm thinking maybe you have a tarball install rather than RPM, and there are old paths sticking around. Just guessing wildly, as I don't really have a good answer. But I do know that very old versions has some resource consumption bugs, and you are upgrading from a very old version, so it seems a possibility.
  The administrator has disabled public write access.
#12654
kgit (User)
Posts: 5
graphgraph
Re:bw.pl up to 100% cpu usage for 20 min 2008/05/18 00:12  
The script that's running is:

/usr/libexec/webmin/virtual-server/bw.pl

How can I see what version this is. It's not in file.
  The administrator has disabled public write access.
#13294
kgit (User)
Posts: 5
graphgraph
Re:bw.pl up to 100% cpu usage for 20 min 2008/06/02 07:07  
Anybody?
  The administrator has disabled public write access.
#13301
Joe (Admin)
Posts: 3642
graph
Re:bw.pl up to 100% cpu usage for 20 min 2008/06/02 15:23  
Any chance I could drop in on your box? (You can email login details to joe@virtualmin.com )
  The administrator has disabled public write access.
#13327
kgit (User)
Posts: 5
graphgraph
Re:bw.pl up to 100% cpu usage for 20 min 2008/06/03 06:58  
Mail send, thanks.
  The administrator has disabled public write access.
#14312
phynias (User)
Posts: 19
graphgraph
Re:bw.pl up to 100% cpu usage for 20 min 2008/06/30 12:05  
i have the same issue bw.pl goes way longer than a couple minutes and uses 100% cpu. i have the latest gpl version of virtualmin and the one that is being run is /usr/libexec/webmin/virtual-server/bw.pl which should be the right version.

did you find anything on his server that may help me ?
  The administrator has disabled public write access.
#14324
Joe (Admin)
Posts: 3642
graph
Re:bw.pl up to 100% cpu usage for 20 min 2008/06/30 15:11  
did you find anything on his server that may help me ?

Things were working as designed on the original posters system...bw.pl is demanding. There is nothing we can do to make tracking every packet in and out of the system not require some resources--memory, CPU, and disk space.

Are you sure it's the same bw.pl process? Check to PID each time you check. In the cases I've looked into, the bw.pl process starts, runs for 20-30 seconds, and then exits correctly. Then, a few minutes later, a new one starts, runs for 20-30 seconds, exits, and so one. If you're not watching closely, it could seem like bw.pl is "always running" because it's running often and at a high CPU usage.

Be sure you're seeing what you think you're seeing.

bw.pl is set to run as "nice" as possible--so it won't use CPU that other processes want, but it will use as much as it can without stepping on other processes. This also means that if your box is working hard on other tasks (like mail delivery) bw.pl could run for longer than 20-30 seconds, as it is waiting for its share of the CPU to be available.

So, to sum up:

bw.pl is demanding, and will always be demanding. This is not a bug--it has a lot of work to do.

bw.pl probably isn't running forever, but it might run longer than it should, if other processes are demanding a lot of CPU. Make sure everything else on the system is running as efficiently as possible. Mail processing is the obvious first candidate for efficiency improvements. Switch to the daemonized versions of spam and AV processing, if you haven't already.

If, you are, in fact seeing bw.pl (the same PID) run for more than a couple of minutes, then there's probably a bug, and I'd want to look at it. But, we haven't had a bug report about bw.pl in at least a year that turned out to be an actual bug--it's pretty much always just that bw.pl is demanding, and people want it to be less demanding. We'd like that too, but Jamie's tuned it as much as is reasonable--we've tinkered with compiled log parsers and other stuff, but they turn out to be no faster (or even slower) than the Perl parser simply because Perls' regex engine and text processing tools are incredibly efficient by most measures (including when stacked up against tools in compiled languages).

But, we do want to know about it, if there is actually a misbehavior--I don't mean to sound discouraging. It just comes up a lot. ;-)
  The administrator has disabled public write access.
Post Reply
get the latest posts directly to your desktop

Talk and Get Help

Support
Forums
Bugs and Issues

Get Virtualmin

OS Support
Buy Online
Download
Copyright 2005-2007 Virtualmin, Inc. All rights reserved.