Recently, I was running a batch file on the server which updates the Downloads files into the site Database. At the same time I was working on the next site update (coming soon) and, on checking the page, noticed that the compression ratio was 0 (no compression). Which meant that the site load was so high that the dynamic-compression employed (a default part of the Conteg Class) had lowered the compression ratio to zero, effectively switching it off. On this 4-cpu machine that did not make sense.
After some checking via PuTTY on the server, and some head-scratching, and glancing at the code, the lightbulb above my head lit up - the function used (_loadAvgLinux()) did not take any account of the number of cpus in the system, which effectively penalises SMP boxes like this one.
Easy to fix. I have taken the easy route out, and put in a variable ($_num_cpu) to state the number of CPUs in the system. That means that it needs changing (possibly) manually, but has the upside of very little code-time, either by me or by the script during operation.
It will be on the site shortly.
2009-04-16 Edited by AK
Edit Reason: Fixed URLs _________________ Alex Kemp
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum