Submitted by bigwombat on Mon, 01/31/2011 - 23:06
Hi Guys!
I've noticed very high CPU usage caused by bw.pl. To compound this, bw.pl is running during peak periods which has a noticeable affect on server performance.
Is it possible to re-schedule the execution of bw.pl? Or to reduce the CPU load consumed by this process?
Best wishes!
Status:
Closed (fixed)
Comments
Submitted by bigwombat on Mon, 01/31/2011 - 23:13 Comment #1
Related post, https://www.virtualmin.com/node/1948
Submitted by andreychek on Mon, 01/31/2011 - 23:19 Comment #2
Howdy -- one option is to use the info you see at that other post you linked to in order to change the "niceness" it runs at, which would cause it to consume less resources whenever it runs.
Another option would be to go into System Configuration -> Bandwidth Monitoring, and changing the "Hours between collection" setting to a higher number... you could even set that to 24 hours if you only want it to run once a day.
Submitted by bigwombat on Mon, 01/31/2011 - 23:23 Comment #3
Thanks again Andrey, I've done the latter - changing "Hours between collection" to 24.
Cheers!
Submitted by JamieCameron on Tue, 02/01/2011 - 13:45 Comment #4
If you are seeing bw.pl take a long time to run, one cause may be that it is scanning very large log files. This can happen if log rotation is failing .. to check if this is the case, SSH in and run :
logrotate -f /etc/logrotate.conf
and see if it reports any errors ..
Submitted by bigwombat on Tue, 02/01/2011 - 19:03 Comment #5
Thanks for the suggestion Jamie, I did run logrotate and there were no errors.
Cheers!