Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-11-2011, 07:19 AM
|
#1
|
Senior Member
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,013
Rep:
|
apache memory usage
Is it normal for apache to use up 14-15% and have so many processes running when it's not a heavily used webserver?
I only have 2 PHP pages running on the webserver and only I access these at the present time as a development access.
Code:
30528 apache 15 0 29648 7648 3904 S 0.0 0.8 0:00.02 httpd
30527 apache 15 0 173m 130m 4864 S 0.0 14.1 0:18.14 httpd
30526 apache 15 0 29656 8016 4136 S 0.0 0.8 0:00.10 httpd
27006 root 15 0 0 0 0 S 0.0 0.0 0:00.08 pdflush
27000 root 15 0 0 0 0 S 0.0 0.0 0:01.40 pdflush
23889 apache 15 0 29644 7752 3892 S 0.0 0.8 0:00.04 httpd
23887 apache 15 0 29620 7736 3904 S 0.0 0.8 0:00.04 httpd
23885 apache 18 0 29644 7936 4088 S 0.0 0.8 0:00.10 httpd
23884 apache 15 0 138m 109m 5008 S 0.0 11.8 0:13.61 httpd
23883 apache 15 0 173m 130m 4932 S 0.0 14.0 0:17.82 httpd
23882 apache 18 0 29652 8028 4140 S 0.0 0.8 0:00.06 httpd
23881 apache 15 0 29800 8008 4116 S 0.0 0.8 0:00.05 httpd
23880 apache 18 0 29776 7896 3996 S 0.0 0.8 0:00.05 httpd
23588 root 19 0 5524 904 712 S 0.0 0.1 0:00.00 ncsa_auth
23587 root 19 0 5524 1100 896 S 0.0 0.1 0:00.00 ncsa_auth
23586 root 20 0 5524 900 712 S 0.0 0.1 0:00.00 ncsa_auth
23585 root 16 0 5524 1100 892 S 0.0 0.1 0:00.01 ncsa_auth
23584 root 15 0 5524 1136 756 S 0.0 0.1 0:00.11 ncsa_auth
23399 root 15 0 88552 9192 2896 S 0.0 1.0 0:19.19 python
23238 apache 15 0 6484 544 416 S 0.0 0.1 0:00.00 httpd-matrixsa
23237 apache 15 0 6484 544 416 S 0.0 0.1 0:00.00 httpd-matrixsa
20838 nobody 16 0 11796 2744 1700 S 0.0 0.3 32:59.82 openvpn
20826 nobody 15 0 12724 5336 1656 S 0.0 0.6 175:03.15 openvpn
19467 apache 15 0 29624 7744 3920 S 0.0 0.8 0:00.00 httpd
18108 named 25 0 50868 3968 1504 S 0.0 0.4 0:06.30 named
18039 mysql 17 0 135m 13m 4528 S 0.0 1.5 0:25.78 mysqld
17989 root 25 0 4876 960 956 S 0.0 0.1 0:00.00 mysqld_safe
17854 root 7 -8 13188 824 572 S 0.0 0.1 0:00.25 audispd
17852 root 15 -4 12648 656 516 S 0.0 0.1 0:00.47 auditd
17811 root 15 0 7224 696 588 S 0.0 0.1 0:00.00 sshd
16121 root 13 -4 2264 436 432 S 0.0 0.0 0:00.01 udevd
15537 squid 18 0 1604 296 244 S 0.0 0.0 0:00.00 unlinkd
15453 squid 15 0 295m 283m 2460 S 0.0 30.6 9:14.93 squid
9908 root 15 0 29308 8588 6000 S 0.0 0.9 0:00.56 httpd
7238 root 15 0 2428 1072 824 R 0.3 0.1 0:00.07 top
7211 root 15 0 5012 1468 1180 S 0.0 0.2 0:00.01 bash
7210 root 16 0 5220 1292 1040 S 0.0 0.1 0:00.00 su
7177 j 16 0 4880 1416 1176 S 0.0 0.1 0:00.00 bash
7176 j 15 0 10236 1704 1128 S 0.0 0.2 0:00.00 sshd
7174 root 15 0 10080 2860 2304 S 0.0 0.3 0:00.05 sshd
6380 apache 15 0 29620 7652 3872 S 0.0 0.8 0:00.07 httpd
6379 apache 17 0 29624 7788 3984 S 0.0 0.8 0:00.08 httpd
6378 apache 20 0 29772 7952 4044 S 0.0 0.8 0:00.04 httpd
6235 postfix 18 0 7052 1768 1420 S 0.0 0.2 0:00.00 pickup
3941 root 15 0 8004 380 356 S 0.0 0.0 0:00.00 squid
3555 root 15 0 5016 920 916 S 0.0 0.1 0:00.08 bash
Last edited by qwertyjjj; 04-11-2011 at 09:02 AM.
|
|
|
04-12-2011, 04:26 PM
|
#2
|
Member
Registered: Aug 2009
Location: Chicago
Distribution: CentOS
Posts: 114
Rep:
|
Apache will spawn as many processes as you have configured it to use, whether or not they are being used doesn't matter. As far as the memory usage: that is more likely due to php than the apache processes themselves.
|
|
|
04-13-2011, 01:10 AM
|
#3
|
Senior Member
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,013
Original Poster
Rep:
|
Quote:
Originally Posted by jcalzare
Apache will spawn as many processes as you have configured it to use, whether or not they are being used doesn't matter. As far as the memory usage: that is more likely due to php than the apache processes themselves.
|
even when php pages are not being downloaded by anyone on the server?
|
|
|
04-16-2011, 03:36 AM
|
#4
|
Senior Member
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,013
Original Poster
Rep:
|
any ideas?
|
|
|
04-16-2011, 10:54 AM
|
#5
|
ELF Statifier author
Registered: Oct 2007
Posts: 676
Rep: 
|
Quote:
Originally Posted by qwertyjjj
any ideas?
|
Your php pages served by php module or as CGI?
|
|
|
04-17-2011, 03:29 AM
|
#6
|
Senior Member
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,013
Original Poster
Rep:
|
PHP
|
|
|
04-17-2011, 05:48 AM
|
#7
|
ELF Statifier author
Registered: Oct 2007
Posts: 676
Rep: 
|
Quote:
Originally Posted by qwertyjjj
PHP
|
So once page was downloaded one of apache processes take the memory and not gave it back - because malloc take memory from the system but free never return it - at least in the most of implementations
|
|
|
04-18-2011, 01:22 AM
|
#8
|
Senior Member
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,013
Original Poster
Rep:
|
Quote:
Originally Posted by Valery Reznic
So once page was downloaded one of apache processes take the memory and not gave it back - because malloc take memory from the system but free never return it - at least in the most of implementations
|
So, it's normal?
|
|
|
04-18-2011, 01:28 AM
|
#9
|
ELF Statifier author
Registered: Oct 2007
Posts: 676
Rep: 
|
Quote:
Originally Posted by qwertyjjj
So, it's normal?
|
I think so.
You can try to restart apache and watch it's memory.
After you make one download, memory usage of one of the processes should increase and stay on this level,
even after download is finished and there is no other activity
|
|
|
All times are GMT -5. The time now is 06:44 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|