Forum Moderators: phranque

Message Too Old, No Replies

Apache load and PHP memory usage

apache process memory diff

         

redhatlab

6:04 pm on Apr 13, 2009 (gmt 0)

10+ Year Member



Hi,

I am trying to optimize apache 2.2 to handle more traffic. The current setup is a box for apache with 32 GB of RAM, 16 processors and SAS drives. Database server has its own dedicated box with similar specifications.

I dedicated a lot of time optimizing queries and tweaking MySQL to get the most out of it. I have notice that my last bottle neck is apache as I would expect to have better response times with such configuration.

With no traffic at all pages generation times is (0.2s~0.5s) with simulated traffic the load jumps to (1+s ~ 5+s). I use the memory_get_usage() function from PHP and I get a 1.6MB per page, but when I check the .top command there is another number:

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
18069 nobody 16 0 177m 13m 4060 S 36 0.0 0:42.35 httpd
18598 nobody 15 0 176m 11m 3976 S 36 0.0 0:18.79 httpd
18065 nobody 15 0 176m 12m 4068 R 31 0.0 0:37.41 httpd
17688 nobody 15 0 175m 11m 4664 S 18 0.0 1:22.97 httpd
18573 nobody 15 0 175m 10m 3840 S 18 0.0 0:28.85 httpd
18614 nobody 15 0 175m 10m 3812 S 18 0.0 0:01.18 httpd
18477 nobody 15 0 176m 11m 3916 R 18 0.0 0:30.00 httpd

Whish one is right and what can else can I do?

Thank you.