Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a web server with 16 GB of RAM. The server has a good traffic and have pics of 300 simultaneous requests.

Unfortunately when these peaks arrive queries fall into error or are very very slow.

When I look at the ram used on my server via the free command, it never exceeds 4-5 GB and the CPU load is on average 10%.

          total       used      free         shared   buffers   cached
Mem:      16392540    4820632   11571908     0        356120    1948920
-/+ buffers/cache:    2515592   13876948
Swap:     1049596     0         1049596

Here is my Apache 2 prefork configuration :

StartServers         32
MinSpareServers      32
MaxSpareServers      64
ServerLimit         512
MaxClients          512
MaxRequestsPerChild   0

Timeout 15
KeepAlive On
MaxKeepAliveRequests 150
KeepAliveTimeout 3

I would like to allow Apache to use more ram to handle all requests and not be overloaded. But even if I change the configuration, it does not seem to have any effect on memory usage.

I said that my server uses plesk.

I also use a MySQL database but containing only a table and a few records.

Do you have any idea?

Thanks for your help.

share|improve this question

closed as off-topic by HopelessN00b Feb 26 '15 at 7:49

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

Please show us relevant excerpts from your error log and any other relevant error messages. – Iain Feb 7 '14 at 8:14

I also use a MySQL database but containing only a table and a few records.

If you are running a MySQL database it could be that your disk is the bottleneck.

Even with 'only a table and a few records' you can still have bad queries, long wait times, or some kind of issue with the database that is causing big delays, resulting in slowness.

The reason I say this, is because you have already identified that your Memory and CPU are not under too much stress.
The other thing to look at is whether or not you have the network throughput required for the amount of requests you are receiving.

As a final note, trust me when I say: tweaking Apache will be fruitless here. Look at your Database, Disk performance, and network bandwidth/throughput.

share|improve this answer

Vasili is quite right about hard drive and bottleneck in it. Also, if you're using Plesk 11 you can install nginx in front of apache. By default nginx not-configured and works in "promiscuous mode". Therefore you can simply configure and customize it according to your requirements thereby release apache from serving static files.

share|improve this answer
Apache is good at static file serving too, except that you need to take care that you don't have things like mod_php. I switched to apache 2.4 event MPM with mod_fastcgi for php. It works like a charm. – Nilesh Feb 8 '14 at 9:59

Not the answer you're looking for? Browse other questions tagged or ask your own question.