The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Reducing resident memory RES for apache?

Discussion in 'Workarounds and Optimization' started by johnburk, Sep 15, 2011.

  1. johnburk

    johnburk Well-Known Member

    Joined:
    Jun 23, 2006
    Messages:
    241
    Likes Received:
    0
    Trophy Points:
    16
    On a server with 8GB of ram it seems that apache is using a lot of resident memory. Which each process the is a usage of 1.7gb of resident memory (RES in top). Is there a way to find out why and to reduce this memory usage?

    Code:
    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
     2933 nobody    16   0 2028m 1.7g 105m S 19.3 21.5   2:08.29 /usr/local/apache/bin/httpd -k start -DSSL
     2177 nobody    16   0 2031m 1.7g 113m S 15.3 21.7   2:12.48 /usr/local/apache/bin/httpd -k start -DSSL
    18599 mysql     15   0  283m 110m 4564 S  4.3  1.4   0:36.03 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/m
     2172 nobody    15   0 63876  21m  896 S  1.7  0.3   0:34.96 nginx: worker process
     2178 nobody    15   0 2044m 1.7g 117m S  1.7 21.9   2:21.12 /usr/local/apache/bin/httpd -k start -DSSL
     2181 nobody    15   0 2035m 1.7g 105m S  1.0 21.6   2:15.29 /usr/local/apache/bin/httpd -k start -DSSL
     3334 nobody    15   0 2025m 1.7g 105m S  1.0 21.5   1:56.42 /usr/local/apache/bin/httpd -k start -DSSL
     2179 nobody    15   0 2026m 1.7g 110m S  0.7 21.6   2:15.29 /usr/local/apache/bin/httpd -k start -DSSL
     3234 nobody    16   0 2028m 1.7g 103m S  0.7 21.5   1:58.85 /usr/local/apache/bin/httpd -k start -DSSL
     8427 nobody    16   0 2016m 1.7g 100m S  0.7 21.3   1:22.27 /usr/local/apache/bin/httpd -k start -DSSL
    
     
  2. tquang

    tquang Member

    Joined:
    Sep 22, 2011
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Your apache is still running prefork or worker? Please post your content of config file
     
  3. gnutoolbox

    gnutoolbox Member

    Joined:
    Sep 25, 2011
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    1.7 Gb sounds unusual, php is running on which mode (iee..CGI, DSO..suphp)?
     
  4. gnutoolbox

    gnutoolbox Member

    Joined:
    Sep 25, 2011
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Also try using the pmap command to find out which library or the anon process is eating your RAM. You can find more on.

    /http://www.gnutoolbox.com/pmap-command/
     
Loading...

Share This Page