Re: Very High Load, kernel 2.4.18, apache/mysql

Roger Larsson
2002-09-25T21:22:47Z

The big question is - why that much CPU usage?

Possible answers:
* PHP, mySQL, Apache - needs that amount of CPU to perform the requested
function.
(you have got suggestions from others)

* The implementation if either has bugs that cause the CPU usage. Garbage
collection? Ineffective algorithms?
- Not much to do other than collecting execution profiles, quite advanced -
recompiling of the tools will probably be needed... And probably help from
the tools developers...

* The implementation of the user code has bugs that cause the CPU usage.
One example:
SQL SELECT with unindexed data - this can usually be noticed as buffer in load
in vmstat but since all data fits in memory - it would cause scans in memory,
with lots of RAM cache misses... And it would work well as long as the
scanned data was smaller than the CPU cache?
- Suggestion: Review your index keys and select statements to make sure that
they match!

/RogerL