2

I noticed that my Ubuntu 10.04 server got incredibly slow. It seems there was a problem with nTop using most of the memory. I could uninstall it after restarting the server, as it was unresponsive until then.
But once uninstalled I found a lot of memory was used by many Apache processes. As my server runs webmin I guess it's normal at least 2 different Apache are running, but I don't get why I had so many processes:

    698     mysql   147100 kB   /usr/sbin/mysqld
    1117    clamav  123380 kB   /usr/sbin/clamd
    8191    root    113148 kB   clamscan --no-summary --stdout -
    8211    root    108740 kB   clamscan --no-summary --stdout -
    720     bind    87288 kB    /usr/sbin/named -u bind
    1655    www-data    61132 kB    /usr/sbin/apache2 -k start
    1656    www-data    61132 kB    /usr/sbin/apache2 -k start
    1657    www-data    61132 kB    /usr/sbin/apache2 -k start
    1658    www-data    61132 kB    /usr/sbin/apache2 -k start
    1659    www-data    61132 kB    /usr/sbin/apache2 -k start
    1680    www-data    61132 kB    /usr/sbin/apache2 -k start
    1726    www-data    61132 kB    /usr/sbin/apache2 -k start
    1759    www-data    61132 kB    /usr/sbin/apache2 -k start
    1573    root    60616 kB    /usr/sbin/apache2 -k start
    798     postgres    45184 kB    postgres: autovacuum launcher process
    767     postgres    45048 kB    /usr/lib/postgresql/8.4/bin/postgres -D /var/lib/postgresql/8.4/main -c config_f ...
    796     postgres    45048 kB    postgres: writer process
    797     postgres    45048 kB    postgres: wal writer process
    1594    www-data    39588 kB    /usr/sbin/apache2 -k start

Do you think it's normal?

2 Answers 2

4

That is entirely normal for a general Apache install (using a system called 'pre-forking'). Each one of those processes would handle one inbound request. Balancing the number of concurrent requests against memory used is an important part of scaling Apache.

3

On *nix httpd spawns multiple processes to handle requests, and they share most of the same memory until they actually do so. So yes, this is normal.

1
  • Thanks a lot! I've seen both answers at the same time, so you won't mind if I don't grant you the accepted answer as you don't seem to lack reputation? :)
    – Nabab
    Apr 24, 2011 at 21:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .