making bbPress (and WordPress) work better!

Posts tagged “performance

LoadAVG patch for more frequent logging and bug fixes

LoadAVG is a free, simple but very useful and lightweight load monitor for servers & VPS.

I encourage everyone to install it if you run a VPS because it will give you an easy snapshot of what is really going on with your server’s performance with virtually no impact otherwise.

It was written in 2006 in PHP by Doug Robbins of Labrador Data (with contributions by David Eshelman) then moved to Silversoft and finally released to the public on it’s own website under GPL – it is no longer updated, the final version came out in June 2010.

It does have a couple of bugs, some less than optimal calculations and inconsistent use of PHP, but nothing that is really a showstopper and it still works.

It’s basic design is to log every 6 minutes (10 times per hour) the server loads for 1/5/15 minute average, the amount of data transmitted and received, and how much memory has been allocated/reserved at that moment. Then it graphs the data using simple html and css on demand and also calculates high/low/averages for those numbers.

After using it for years I decided to finally fix some of the minor bugs (including the graph annoyingly doubling in height in certain conditions) and also increase the monitoring to every 3 minutes for more granular data – today’s servers/browsers can easy handle 20 datapoints per hour vs ten, and it’s important to find frequent load spikes that are even just a couple minutes long which are missed with only 6 minute logging.

So I’ve decided to share my replacement for calculations.php which has the bulk of those important fixes/changes.

view / download (save as/replace calculations.php)

Once you have that replaced, if you also want 3 minute updates instead of six, just change your crontab from */6 to */3

I’ve made the calculations.php backwards compatible with old data, so you won’t lose anything. You can replace it at anytime, but you do have to make one other tiny change after you do that, edit the display.css,
search for,,div.rd,div.wh,div.yl {
and change the width: 1px; to width: 2px;

That’s it. Then you will notice your old data is spaced apart by 1px but the new data will be a finer resolution.

Note that my update removes IE 5/6/7 support but IE9 should probably function (and maybe IE8 but why are you using IE ?).

If there is any further interest, I’ll eventually release my other improvements to this program since it’s GPL.

By the way, if you are using plesk instead of cpanel, etc. (more…)

WordPress will be 15% faster under PHP 5.3

I may finally upgrade my servers from PHP 4.4.8 to PHP 5.3 when it’s released. I’ve been sticking to PHP 4 because I don’t use anything that needs 5.x and 5.0 is slower than 4.x is some situations.

But apparently the performance has been put back into 5.3 according to this obscure posting on which quotes WordPress (among others) as an example of performance improvements: