1

we are running an open suse 10 on an: AuthenticAMD, Dual-Core AMD Opteron(tm) Processor 1212 HE with 2 Gigabytes of ram.

Hosted as Apache Vhots are:

  • Bulletin Board System with 30.000 Pagehits per Day
  • Some Wordpress Blogs (5) with 25.000 Pagehits per Day
  • Plesk 9.3.x
  • MySQL
  • OsCommerce Online shop with 4000 Pagehits per Day

Sometimes the cpu load rises up to 15. We have no idea why? Altough the server crashed when load is rising higher.

Is it just to much for such a machine?

1 Answer 1

2

The system load figures are not purely influenced by CPU power because as well as counting the average number of processes that are actively processing during the metered period it also counts those that would be if they were not waiting for an I/O operation to complete.

Many heavy load spikes are due to I/O contention. This can be caused by a number of things: being low on memory (so less information can be cached and/or swapping activity increases) in which case adding more RAM can help a lot, bad DB design or bad queries to the DBs (often resulting in full table scans where index scans would be possible instead, or sub-queries being run 100s of times where a more efficient join could be used - more RAM can help here too but that is at best temporary solution compared to improving the design), having slow I/O subsystem (slow disks for instance, or using RAID5 for a system that makes many small writes, and so on), or some combination of the above.

You should monitor the CPU stats (%IOWait as well as %user, %system and %nice), memory/swap use and disc I/O to see what happens during these busy periods, for further clues. You should also consider monitoring Apache in more detail to see if a sudden glut of hits to a particular vhost is the cause. I usually use http://collectd.org/ for this sort of monitoring though there are a number of other solutions out there too. Most DBs support logging queries that take longer than a fixed time to run, so turning this feature on can help (though you need to use your other clues to work out if the reported queries are taking a long time because they need optimising or just because the system is under heavy load in general).

With an average or ~0.6 hits per second I suspect you are seeing periods with much higher hit rates which cause a raise in load for one of the above reasons (I/O contention and/or memory limitation, rather than CPU use). Daily hit counts do not mean an awful lot unless your traffic is very stable throughout the day, which is unusual - hourly rates for your busiest period in the day would be more meaningful.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .