Knowledgebase

how to optimize apache 2.4?

Posted by Maikon, 04-28-2012, 01:21 AM
since the new release im not quite sure what i should do to optimize apache. I have 10k visitors per day and sometimesi get cpu load 1 which is unusual as i have e1230 xeon

Posted by quad3datwork, 04-28-2012, 01:34 AM
Load "1" on a "quad" core E3-1230 isn't bad at all. When the load number gets to "4" then you may have something to be worrying about.

Posted by Steven, 04-28-2012, 01:50 PM
I don't read too much into the server load most of the time. What really counts is the idle CPU percentage.

Posted by Server Management, 04-28-2012, 01:58 PM
I wouldnt say that a load of "1.00" is unusual for the type of CPU you have...

Posted by funkywizard, 04-28-2012, 03:12 PM
These days even that doesn't tell you as much as it used to, though in general I would agree with you that load average is not very meaningful. I've seen servers with LA over 50 and still performing great, or LA under 5 and being bogged down, so it really doesn't mean much. Now, for cpu idle %, with speedstep, the E3's clock to 50% of normal unless they're under heavy load. Then with turboboost, that 50% clock is actually more like 40% of maximum. Then with hyperthreading, that muddies the waters even more because the "hyperthreaded cores" provide less horsepower than the "real" cores. 50% cpu idle could actually mean 80% idle or 50% idle or 25% idle and there's no good way to tell for sure. You can check this out by running: cat /proc/cpuinfo | grep MHz We set up graphs for our cpu that not only graph idle / used percentages, but also graph the aggregate clock speed between the cores, so that we can get a better idea of how much headroom we have on cpu use. Even then, it's not perfect, in order to figure out how much power the server could really handle, we intentionally overloaded it with traffic to see how many requests / second it could do, and we typically look at the requests / second as the most reliable indicator of how much more traffic we can handle on the box. This works for us because our workloads are pretty predictable and one request is about as cpu intensive as any other. This wouldn't necessarily work for others as this can vary based on the workload of your sites.

Posted by Steven, 04-28-2012, 03:27 PM
I understand what you are saying just fine as I have observed the same thing, and even have worked with a few guys on some kernel patches to even it all out on a customers deployment, but still for the average joe, idle cpu is a good determine factor if there is a resource saturation issue, whereas load average is kind of bunk. An example: One of my customers insists on using apache, yum installed apache no less. We serve over a gigabit (on event days, it can reach 3gbit of outbound transfer) of 250kb size image files on apache. The load average is over 4000, yet the idle cpu value is 95% idle. If we were basing it on load average that server would be extremely overloaded Last edited by Steven; 04-28-2012 at 03:30 PM.

Posted by funkywizard, 04-28-2012, 04:05 PM
Definitely agree that LA is garbage and idle cpu % gives you a better indication, just saying that you can't take it literally to show exactly how much headroom you have. a 50% idle cpu does not imply you can put twice as much load on the server. You might be able to put 4x as much load on there, only only 25% more, it's very hard to say. But definitely, if you are below 75% cpu utilization as listed by top (assuming you aren't maxing on disk i/o or ram either), you probably are not overloaded and can put more load on without any serious issues.

Posted by Steven, 04-28-2012, 08:55 PM
All I was telling the OP was that watching load is pointless,and that watching the idle cpu is more important. If they have a load of 1.00 and they are not using much cpu via idle cpu then it doesn't matter that their LA is 1.00. I have not taken LA seriously in probably 6 years, probably longer.



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
IP blocking problem (Views: 630)
Hosting Shopping Cart (Views: 567)


Language:

Client Login

Email

Password

Remember Me

Search