My question is what is the maximum number of users that Apache webserver 2.2.2 can handle, i have a website which sometimes gets over 300+ concurrent users, however apache default configuration is set to max 150, i know i can increase this value, however if i do i fear that i might run over the capacity that Apache can handle, my server is quite powerful with 8 quad core AMD processor with 16 GM memory
How do i determine how many requests that apache can handle,
In general what the options/configurations for a best optimised for server loads. i.e disable keep alive ..etc
When i increase the max user size , MySql eats up most of the processor power with going over 150% CPU sometimes .... not sure why ..
Any experts ?
Server LimitationsThe default Apache setting for MaxClients is 256, however the fact that other distributions often use different values as the default setting must be taken into consideration. Given a desire to set the MaxClients value greater than 256, the ServerLimit setting must also be increased correspondingly.
By default, Apache Request limit is 160 requests per second, that is, Apache can handle up to 160 requests per second, without any modification.
Apache comes with 40-100 max threads. It can be increased to allow more threads to be handled at the same time. The application should be monitored before making any changes to it. Based on the response, try to change "ThreadsPerChild" and "AcceptThreads" accordingly.
On the TCP level the tuple (source ip, source port, destination ip, destination port) must be unique for each simultaneous connection. That means a single client cannot open more than 65535 simultaneous connections to a single server. But a server can (theoretically) serve 65535 simultaneous connections per client.
Apache comes with 40-100 max threads. It can be increased to allow more threads to be handled at the same time.
The application should be monitored before making any changes to it. Based on the response, try to change "ThreadsPerChild" and "AcceptThreads" accordingly.
The default amount of "maximum" number of threads is usually enough; however, there can be conditions where this number may have to be increased. The threads usage can be monitored. To monitor, start the Administrative instance, select the HTTP server in question, and select Real Time Server Statistics at the bottom left.
If Idle Threads is close to or at zero, this is a problem. As long as Idle Threads is zero, no new client connections can be established. New clients will be put into a wait status until a thread becomes available. Our recommendation for this condition is to add the directive ThreadsPerChild with an increased value, approximately double the current value if it was in the range of 40 to 100, or plus 50, if it was above 100. The required minimum value (for the maximum parameter) can only be found by trial and error. If after increasing the value, the server runs smoothly, stop testing.
(source)
Recommendations
Please use Keep Alive as it will increase the performance of your server. Disable keep Alive settings only when there is a firewall in between web or app. Or you are facing package drop issues/connection reset msg.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With