Re: Incredible amount of memory allocated by Apache?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 15, 2011 at 12:38 PM, Tony Mobily <merc@xxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux