I am running a wordpress site and each PHP process usage about 200mb to 250mb resident size memory. With 16GB of ram, the server can only handle about 70 processes. By incre
Rasmus Lerdorf did a conference about PHP performance at Confoo in 2010 and he used a Wordpress blog as an example, this should give you great tools to answer your question:
http://talks.php.net/show/confoo10/1
To sum up:
phpinfo() and disable PHP extensions that you don't use. They can take a lot of memory (imagick, curl, ...)siege. Sometimes, tiny optimisations have great impact on performance, so make sure you have metrics, to help you make your decisions.md5() to hash my SQL queries and cache them. The md5() calls where using 20% of the CPU time.I would definitely start by disabling PHP extensions if possible.
I'll summarize what Lisa did to find the problem:
pmap -d <pid>. The output showed that there's a huge amount of shared memory used by the process:00002b3772850000 2097152 rw-s- 0000000000000000 000:00009 [ shmid=0x2d1b803a ]
ipcs -m. It showed that there are a lot of shared memory regions created by user nobody (the web server), here are just a few of them:0x00000000 117964807 nobody 600 2147483648 1 dest 0x00000000 117997576 nobody 600 2147483648 1 dest 0x00000000 118030345 nobody 600 2147483648 1 dest 0x00000000 118063114 nobody 600 2147483648 1 dest
for i in `ipcs -m | cut -d' ' -f2 | grep '^[0-9]'`; do ipcrm -m $i; done