Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On my 512MB ram server memory use was at 50%. I installed fastcgi and php5-fpm and now the server memory is report 137%.

See below for results of 'top'. Currently I have a site in apache being served by nginx as a reverse proxy. But the site currently is just one index.html file with a couple words in it.

To note I followed these instructions to set the fastcgi and php5-fpm up: http://alexcabal.com/installing-apache-mod_fastcgi-php-fpm-on-ubuntu-server-maverick/

    1 root      15   0 23560 1644 1316 S    0  0.2   0:01.23 init                                  
 1136 root      15   0 18888 1012  784 S    0  0.1   0:00.07 cron                                  
 1202 mysql     15   0  183m  23m 6768 S    0  2.6   0:02.70 mysqld                                
 1210 root      15   0 49424 2668 2108 S    0  0.3   0:05.41 sshd                                  
 1231 syslog    15   0 12536  796  600 S    0  0.1   0:00.30 syslogd                               
 1297 root      15   0 84088  21m 1604 S    0  2.3   0:05.56 miniserv.pl                           
 3748 root      16   0 70764 3308 2568 S    0  0.3   0:00.02 sshd                                  
 3760 hmark     15   0 70764 1632  888 S    0  0.2   0:00.00 sshd                                  
 3761 hmark     15   0 20924 2360 1616 S    0  0.2   0:00.01 bash                                  
 3950 root      15   0 71536 3324 2580 S    0  0.4   0:00.02 sshd                                  
 3962 hmark     18   0 71536 1652  892 S    0  0.2   0:00.00 sshd                                  
 3963 hmark     16   0 20924 2356 1616 S    0  0.2   0:00.01 bash                                  
 3987 hmark     15   0 19180 1360 1068 R    0  0.1   0:00.13 top                                   
 9753 root      18   0 54900 1228  352 S    0  0.1   0:00.00 nginx                                 
 9754 www-data  18   0 55240 2120  948 S    0  0.2   0:00.49 nginx                                 
 9755 www-data  18   0 55240 2116  948 S    0  0.2   0:00.44 nginx                                 
 9756 www-data  15   0 55240 2132  948 S    0  0.2   0:00.43 nginx                                 
 9757 www-data  18   0 55240 1668  504 S    0  0.2   0:00.59 nginx                                 
32650 root      18   0 86460 4408 2736 S    0  0.5   0:00.01 apache2                               
32653 www-data  25   0 85016 2172  524 S    0  0.2   0:00.00 apache2                               
32654 www-data  18   0 85016 2112  468 S    0  0.2   0:00.00 apache2                               
32656 www-data  15   0 86192 2112  468 S    0  0.2   0:00.01 apache2                               
32658 www-data  18   0  302m 4088 1568 S    0  0.4   0:00.00 apache2                               
32660 www-data  25   0  302m 4240 1564 S    0  0.4   0:00.00 apache2                               
32742 root      18   0  121m 4216 1256 S    0  0.4   0:00.12 php5-fpm                              
32743 www-data  18   0  121m 5476 2332 S    0  0.6   0:00.00 php5-fpm                              
32744 www-data  18   0  121m 4464 1468 S    0  0.5   0:00.00 php5-fpm                              
32745 www-data  18   0  121m 4460 1464 S    0  0.5   0:00.00 php5-fpm                              
32746 www-data  18   0  121m 4464 1468 S    0  0.5   0:00.00 php5-fpm                              
32747 www-data  25   0  121m 3740  784 S    0  0.4   0:00.00 php5-fpm                              
32748 www-data  25   0  121m 3740  784 S    0  0.4   0:00.00 php5-fpm                              
32750 www-data  25   0  121m 3740  784 S    0  0.4   0:00.00 php5-fpm                              
32752 www-data  25   0  121m 3740  784 S    0  0.4   0:00.00 php5-fpm                              
32753 www-data  25   0  121m 3740  784 S    0  0.4   0:00.00 php5-fpm                              
32754 www-data  25   0  121m 3744  784 S    0  0.4   0:00.00 php5-fpm                              
32755 www-data  25   0  121m 3744  784 S    0  0.4   0:00.00 php5-fpm                              
32756 www-data  25   0  121m 3744  784 S    0  0.4   0:00.00 php5-fpm                              
32757 www-data  25   0  121m 3744  784 S    0  0.4   0:00.00 php5-fpm                              
32758 www-data  25   0  121m 3744  784 S    0  0.4   0:00.00 php5-fpm                              
32759 www-data  25   0  121m 3744  784 S    0  0.4   0:00.00 php5-fpm                              
32760 www-data  25   0  121m 3744  784 S    0  0.4   0:00.00 php5-fpm                              
32761 www-data  25   0  121m 3744  784 S    0  0.4   0:00.00 php5-fpm                              
32762 www-data  18   0  121m 3744  784 S    0  0.4   0:00.00 php5-fpm                              
32763 www-data  25   0  121m 3744  784 S    0  0.4   0:00.00 php5-fpm                              
32764 www-data  25   0  121m 3744  784 S    0  0.4   0:00.00 php5-fpm 
share|improve this question
add comment

1 Answer

PHP FPM will indeed spawn multiple processes, it spreads requests across them all.

You should be able to adjust how many spawn by editing /etc/php5/fpm/pool.d/www.conf.

share|improve this answer
    
But to go from 50% memory use to 137% memory use can't be the expected default behavior right? Even when I disable the php5-fpm service now it shows 126% memory usage. Where is before I tried the steps in the article above I was getting 50% memory roughly. When looking in top nothing appears to be using much of any memory though that I can see. All .4% kinda thing. –  heavymark Nov 15 '11 at 20:49
    
What does free -m say? Where are you getting the 126% figure from? –  ceejayoz Nov 15 '11 at 20:50
    
From the MediaTemple control panel. free -m total used free shared buffers cached Mem: 924 699 224 0 0 0 -/+ buffers/cache: 699 224 Swap: 0 0 0 –  heavymark Nov 15 '11 at 20:52
    
Also sudo cat /proc/user_beancounters shows lockedpages 0 0 600 600 20 privvmpages 179205 179356 236586 249036 150 shmpages 9324 9324 15000 15000 16 –  heavymark Nov 15 '11 at 20:52
    
So looks like privvmpages is going way over, but never even heard of that, and the changes I made today from the link above never asked me to install or modify anything called privvmpages. –  heavymark Nov 15 '11 at 20:54
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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