httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Evans <tevans...@googlemail.com>
Subject Re: [users@httpd] Incredible amount of memory allocated by Apache?
Date Tue, 15 Feb 2011 12:44:25 GMT
On Tue, Feb 15, 2011 at 12:38 PM, Tony Mobily <merc@mobily1.com> wrote:
> Hi,
>
> I am very confused by some output in my server. I am hoping my good
> karma for running an online magazine about free software will help me
> get some advice, instead of being laughed as...
> Top is giving me this:
> op - 04:28:17 up 48 days, 8:56, 1 user, load average: 0.38, 0.32, 0.36
> Tasks: 140 total, 1 running, 139 sleeping, 0 stopped, 0 zombie
> Cpu(s): 15.7%us, 4.7%sy, 0.0%ni, 79.0%id, 0.5%wa, 0.0%hi, 0.0%si, 0.0%st
> Mem: 8072080k total, 7585872k used, 486208k free, 62404k buffers
> Swap: 1959888k total, 1959852k used, 36k free, 1495040k cached
>
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
> 2821 mysql 15 0 481m 105m 3612 S 21.6 1.3 3282:41 mysqld
> 16708 apache 16 0 5570m 2.9g 3636 S 20.3 38.1 0:08.80 httpd
> 16941 apache 15 0 5570m 2.9g 3588 S 12.3 37.8 0:03.48 httpd
> 16699 apache 15 0 5570m 2.9g 3616 S 6.7 37.8 0:05.26 httpd
> 16843 apache 15 0 5572m 2.9g 4540 S 5.3 37.9 0:09.73 httpd
> 16970 apache 15 0 5570m 2.9g 3676 S 5.3 37.9 0:08.62 httpd
> 16701 apache 15 0 5570m 2.9g 3620 S 3.0 37.9 0:07.15 httpd
> 17371 apache 15 0 5570m 2.9g 3548 S 1.0 37.7 0:01.97 httpd
> 17577 apache 15 0 5570m 2.9g 3576 S 0.3 37.7 0:01.12 httpd 15/02/11 20:30:43
>
> 2.9g!! That's 3Gb for Apache?!?
>
> ps' output is even scarier:
>
> [root@centos555208 ~]# ps -ylChttpd --sort=rss
> S   UID   PID  PPID  C PRI  NI   RSS    SZ WCHAN  TTY          TIME CMD
> S    48  1392  2930  0  75   0 3653712 1065487 semtim ?    00:00:00 httpd
> S    48  1072  2930  0  75   0 3653784 1065487 semtim ?    00:00:01 httpd
> S    48  1129  2930  0  75   0 3653788 1065484 semtim ?    00:00:01 httpd
> S    48   927  2930  0  75   0 3653792 1065487 -  ?        00:00:01 httpd
> S    48   924  2930  0  75   0 3653812 1065484 semtim ?    00:00:02 httpd
> S    48   990  2930  0  75   0 3653840 1065485 semtim ?    00:00:03 httpd
> S    48   926  2930  0  75   0 3654716 1066004 semtim ?    00:00:02 httpd
> S    48   925  2930  0  75   0 3654940 1066004 semtim ?    00:00:02 httpd
> S    48   929  2930  0  75   0 3654948 1066001 semtim ?    00:00:04 httpd
> S    48  1210  2930  0  75   0 3659136 1065484 semtim ?    00:00:01 httpd
> S    48  1127  2930  0  75   0 3659232 1065487 semtim ?    00:00:01 httpd
> S    48   930  2930  0  75   0 3659616 1065487 semtim ?    00:00:03 httpd
> S    48   933  2930  0  75   0 3659616 1065484 semtim ?    00:00:03 httpd
> S    48   965  2930  0  75   0 3660488 1066004 semtim ?    00:00:03 httpd
> S     0  2930     1  0  78   0 3662976 1065484 stext ?     01:53:07 httpd
> S    48   949  2930  0  75   0 3669976 1065487 semtim ?    00:00:02 httpd
> S    48   934  2930  0  75   0 3671048 1065484 -  ?        00:00:02 httpd
> S    48   961  2930  0  75   0 3672244 1066001 semtim ?    00:00:03 httpd
>
> Is something going _very_ wrong with my server?
> Any hints?
>
> Thanks,
>
> Merc.
>

Do you run a lot of PHP websites (or a few particularly heavy ones,
like joomla)? That sort of usage is 'normal' for them.

You could run php as fast cgi, which would move the PHP interpreter
out of apache and give you a better idea of what is using your memory
like that. I would be quite surprised if it was apache doing that!

Cheers

Tom

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message