I’ve noticed some nasty spikes on our IWorx box in the neiborhood of every 5 minutes. It lasts about 10-15 seconds. After some boring time watching top, I found the culprit to be bandwidth.php and storage.php (was too slow to catch the exact commands) invoked locally.
As you guys know, we have a LOT if dynamic content. Between that, and the other odd stuff we are doing on the machine, this may get to be a problem. Is it possible to make these two scripts more efficient? bandwidth.php is spiking over 50% of the CPU’s time, and storage.php is in the 40-45% range. Is it safe/possible to nice these a bit so other processes aren’t affected quite as much?
We’re tweaking storage.php to run less often in the next release as it doesn’t need to run every 5 minutes as it does now. My only concern with nicing them is that since they are invoked every 5 minutes you may get overrun.
bandwidth.php is pretty compact / efficient as it. When we originally designed iworx-cp we didn’t want to parse huge transfer logs (which are inherently inaccurate) to calc bandwidth. Doing so would eat tons of CPU and also not give any real-time metrics on bandwidth. What iworx-cp does is read the files in /var/lib/mod_watch/ which are single line files housing bandwidth metrics. The more sites you have the more files are read.
I know this doesn’t totally solve things but at least it’ll give you a better idea of what is going on.
Cutting back on how often storage.php is run should help quite a bit. Its pretty easy to deal with a spike, but when both storage and bandwidth run at the same time, its a quite a long performance hit. Thanks.