Forums / Setup & design / Apache problems (response + memory usage)
Atle Pedersen
Monday 06 August 2007 7:25:55 am
Hi everbody,
just wondering if anyone has encountered similar problems, and/or has an idea what might be wrong with a server showing very poor performance.
Symptoms are:Top shows a lot more Virtual memory than on some other installations (roughly twice as much) and with very little shared memory, causing the server to be able to handle to few processes before it starts swapping.
When MaxClients are reached, the server uses a very long time to handle connection timeouts. This also happens when MaxClients are set low enough to avoid swapping.
Do anyone recognise these symptoms, or have suggestions to tests worth running?
The installation is a Xen virtual server running Debian Etch on dual AMD64. Apache 1.3.34-4.1 Version: 6:4.4.7-0.dotdeb.1MySQL 5.0.32-7etch1
Lazaro Ferreira
Monday 06 August 2007 8:13:00 am
Hi,
Are the Apache process taking a lot of memory running Exponential websites ?
Lazaro http://www.mzbusiness.com
Tuesday 07 August 2007 7:21:33 am
Earlier, tests showed that using a php accelerator only gave a very slight performance boost. So we had no accelerator running. But we wanted to test with an accelerator, and this actually helped a great deal. The server became much more responsive and can now handle much more load than earlier.
The strange thing though, is that each process now uses even more virtual memory. Around 200 MB per process. And shared memory is only around 35MB per process. To me these numbers make no sense any more. It seems that memory allocated for each process is much higher than is actually used. (70 clients on 2GB and still free mem)
The PHP accelerator helped a great bit. But I still don't understand what's going on.
Tuesday 07 August 2007 12:13:55 pm
trying again...
we have had this kind of problem in the past, they were related to Exponential or php bugs
which Exponential version are you using ?
Kim Johansen
Tuesday 07 August 2007 1:30:30 pm
Hi Atle,
It's a lots of things that can cause the problem you are experiences. You should go through your configuration for Apache/PHP, and make sure your not giving away more memory then you got. You can use pmap to see what Apache use all the memory to.
You should also monitor system resources over time by some tools like Munin. I will make it much easier to see the consequence's when doing small changes on your server, and easier to see whats causing the problem.
Also make sure your running your vm with paravirtualization, and not full virtualization.
Try out Free eZ Publish 4.0 Trial Hosting for 14 days: http://webdealhosting.com/ez-publish-trial-hosting High quality eZ Publish Hosting since 2001!
Bruce Morrison
Tuesday 07 August 2007 4:29:42 pm
Hi all
Here is the output from top of a relatively busy system we manage. Running eZ 3.8.8, apache 2, php 4.4
The figures seem to differ considerably from what has been described.
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 17051 apache 15 0 63872 28m 17m S 22 0.9 0:19.86 httpd 17598 apache 15 0 64028 27m 16m S 13 0.9 0:11.69 httpd 18173 apache 16 0 65568 29m 17m R 5 1.0 0:10.45 httpd 19052 apache 16 0 63976 24m 13m S 2 0.8 0:02.83 httpd 19016 apache 15 0 63980 24m 13m S 1 0.8 0:09.90 httpd 17968 apache 15 0 64136 29m 18m S 0 1.0 0:08.28 httpd 18177 apache 15 0 63068 24m 14m S 0 0.8 0:09.56 httpd 18698 apache 15 0 62480 23m 14m S 0 0.8 0:04.13 httpd
Perhaps you can post some raw figures / config ? What is your php.ini memory_limit set at?
CheersBruce
My Blog: http://www.stuffandcontent.com/ Follow me on twitter: http://twitter.com/brucemorrison Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish