High Memory usage

Discussion in 'Server Operation' started by EckyBrazz, Aug 3, 2012.

  1. EckyBrazz

    EckyBrazz New Member

    Hi,

    My server has 4GB of memory, but the total commited memory is a lot higher (6.2GB).

    I followed the guid : The Perfect Server - Ubuntu 12.04 LTS (nginx, BIND, Dovecot, ISPConfig 3)

    How to get my memory usage better ?

    Code:
    top - 14:01:36 up 3 days, 23:29,  3 users,  load average: 0.24, 0.22, 0.17
    Tasks: 419 total,   1 running, 414 sleeping,   4 stopped,   0 zombie
    Cpu(s):  0.0%us,  0.1%sy,  0.0%ni, 99.6%id,  0.2%wa,  0.0%hi,  0.1%si,  0.0%st
    Mem:   4040628k total,  3803656k used,   236972k free,   180004k buffers
    Swap:  4182012k total,   164348k used,  4017664k free,  1634668k cached
    
      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  GROUP    COMMAND
    27251 mysql     20   0 1692m  66m 7708 S    0  1.7   0:07.08 mysql    mysqld
    15708 bind      20   0  673m  26m 2644 S    0  0.7   0:01.46 bind     named
    19146 root      20   0  482m 7044 2368 S    0  0.2   1:48.55 root     fail2ban-server
    11529 web11     20   0  432m  86m  36m S    0  2.2   0:00.97 client6  php5-fpm
    11533 web11     20   0  432m  86m  36m S    0  2.2   0:00.76 client6  php5-fpm
    11535 web11     20   0  431m  86m  36m S    0  2.2   0:00.75 client6  php5-fpm
    11534 web11     20   0  430m  85m  37m S    0  2.2   0:00.81 client6  php5-fpm
    11539 web11     20   0  429m  81m  34m S    0  2.1   0:00.78 client6  php5-fpm
    11538 web11     20   0  427m  81m  35m S    0  2.1   0:01.28 client6  php5-fpm
    11536 web11     20   0  426m  81m  36m S    0  2.1   0:00.87 client6  php5-fpm
    11540 web11     20   0  426m  81m  36m S    0  2.1   0:01.69 client6  php5-fpm
    11528 web11     20   0  426m  81m  36m S    0  2.1   0:00.79 client6  php5-fpm
    11530 web11     20   0  425m  79m  35m S    0  2.0   0:00.78 client6  php5-fpm
    11542 web11     20   0  425m  81m  37m S    0  2.1   0:02.93 client6  php5-fpm
    11532 web11     20   0  425m  80m  36m S    0  2.0   0:00.66 client6  php5-fpm
    11544 web11     20   0  425m  80m  36m S    0  2.0   0:00.60 client6  php5-fpm
    11545 web11     20   0  422m  77m  36m S    0  2.0   0:00.74 client6  php5-fpm
    11543 web11     20   0  412m  68m  36m S    0  1.7   0:00.69 client6  php5-fpm
    11531 web11     20   0  412m  67m  36m S    0  1.7   0:01.63 client6  php5-fpm
    11537 web11     20   0  412m  66m  36m S    0  1.7   0:00.68 client6  php5-fpm
     2205 clamav    20   0  410m 142m 5644 S    0  3.6   1:34.05 clamav   clamd
    11541 web11     20   0  409m  62m  34m S    0  1.6   0:00.66 client6  php5-fpm
    11658 web6      20   0  406m  44m  19m S    0  1.1   0:00.29 client5  php5-fpm
    11546 web11     20   0  404m  52m  30m S    0  1.3   0:01.24 client6  php5-fpm
    11660 web6      20   0  402m  38m  16m S    0  1.0   0:00.19 client5  php5-fpm
    11656 web6      20   0  400m  36m  17m S    0  0.9   0:00.24 client5  php5-fpm
    11696 web5      20   0  398m  51m  33m S    0  1.3   0:02.71 client2  php5-fpm
    11694 web5      20   0  398m  51m  33m S    0  1.3   0:03.00 client2  php5-fpm
    11613 www-data  20   0  397m  30m  14m S    0  0.8   0:00.16 www-data php5-fpm
    11713 web5      20   0  397m  52m  35m S    0  1.3   0:02.61 client2  php5-fpm
    11654 web6      20   0  397m  38m  20m S    0  1.0   0:00.15 client5  php5-fpm
    11655 web6      20   0  397m  28m  11m S    0  0.7   0:00.14 client5  php5-fpm
    11704 web5      20   0  396m  52m  35m S    0  1.3   0:02.63 client2  php5-fpm
    11714 web1      20   0  395m  37m  21m S    0  0.9   0:00.16 client1  php5-fpm
    11697 web5      20   0  395m  46m  30m S    0  1.2   0:02.26 client2  php5-fpm
    11611 www-data  20   0  395m  27m  14m S    0  0.7   0:00.17 www-data php5-fpm
    11610 www-data  20   0  394m  28m  15m S    0  0.7   0:00.22 www-data php5-fpm
    11659 web6      20   0  394m  29m  14m S    0  0.7   0:00.17 client5  php5-fpm
    11547 web11     20   0  394m  49m  36m S    0  1.3   0:00.64 client6  php5-fpm
    11657 web6      20   0  393m  26m  13m S    0  0.7   0:00.14 client5  php5-fpm
    11709 web5      20   0  392m  47m  34m S    0  1.2   0:02.42 client2  php5-fpm
    11699 web5      20   0  392m  46m  33m S    0  1.2   0:02.64 client2  php5-fpm
    11702 web5      20   0  392m  47m  35m S    0  1.2   0:02.73 client2  php5-fpm
    11701 web5      20   0  391m  47m  35m S    0  1.2   0:02.69 client2  php5-fpm
    11705 web5      20   0  391m  47m  35m S    0  1.2   0:02.59 client2  php5-fpm
    11710 web5      20   0  391m  45m  34m S    0  1.2   0:02.33 client2  php5-fpm
    11612 www-data  20   0  391m  25m  14m S    0  0.7   0:00.09 www-data php5-fpm
    11707 web5      20   0  391m  46m  34m S    0  1.2   0:02.89 client2  php5-fpm
    11698 web5      20   0  391m  46m  35m S    0  1.2   0:02.55 client2  php5-fpm
    11708 web5      20   0  391m  45m  34m S    0  1.2   0:02.39 client2  php5-fpm
    11700 web5      20   0  390m  46m  35m S    0  1.2   0:02.73 client2  php5-fpm
    11695 web5      20   0  390m  43m  32m S    0  1.1   0:02.67 client2  php5-fpm
    11703 web5      20   0  390m  46m  35m S    0  1.2   0:02.64 client2  php5-fpm
    11712 web5      20   0  390m  45m  35m S    0  1.2   0:02.66 client2  php5-fpm
    11711 web5      20   0  390m  45m  34m S    0  1.1   0:02.26 client2  php5-fpm
    11706 web5      20   0  389m  43m  34m S    0  1.1   0:02.23 client2  php5-fpm
    11527 root      20   0  388m  10m 4408 S    0  0.3   0:00.40 root     php5-fpm
    11589 ispconfi  20   0  388m  18m  11m S    0  0.5   0:00.40 ispconfi php5-fpm
    11588 ispconfi  20   0  387m  20m  12m S    0  0.5   0:00.37 ispconfi php5-fpm
    11680 web17     20   0  387m 9064 2608 S    0  0.2   0:00.00 client7  php5-fpm
    11674 web17     20   0  386m 8368 2028 S    0  0.2   0:00.00 client7  php5-fpm
    11675 web17     20   0  386m 8344 2012 S    0  0.2   0:00.00 client7  php5-fpm
    11676 web17     20   0  386m 8356 2016 S    0  0.2   0:00.00 client7  php5-fpm
    11677 web17     20   0  386m 8360 2020 S    0  0.2   0:00.00 client7  php5-fpm
    11678 web17     20   0  386m 8348 2016 S    0  0.2   0:00.00 client7  php5-fpm
    11679 web17     20   0  386m 8332 2012 S    0  0.2   0:00.00 client7  php5-fpm
    11681 web17     20   0  386m 8332 2004 S    0  0.2   0:00.00 client7  php5-fpm
    11548 ispapps   20   0  386m 6976  740 S    0  0.2   0:00.00 ispapps  php5-fpm
    11549 ispapps   20   0  386m 6976  740 S    0  0.2   0:00.00 ispapps  php5-fpm
    11550 ispapps   20   0  386m 6976  740 S    0  0.2   0:00.00 ispapps  php5-fpm
    11551 ispapps   20   0  386m 6976  740 S    0  0.2   0:00.00 ispapps  php5-fpm
    
     
  2. falko

    falko Super Moderator ISPConfig Developer

    On the Options tab of your web sites in ISPConfig, lower the PHP-FPM values:

    PHP-FPM pm.max_children: 10
    PHP-FPM pm.start_servers: 2
    PHP-FPM pm.min_spare_servers: 1
    PHP-FPM pm.max_spare_servers: 5

    ISPConfig 3.0.5 will have lower values by default, plus the option to select the PHP-FPM mode (static, dynamic, or ondemand).
     
  3. EckyBrazz

    EckyBrazz New Member

    [Resloved] High Memory usage

    Thanks Falko, that did it.

    Memory usage dropped instantly.
    Don't know why, but these setting came as default when setting up ISPConfig.
     
  4. falko

    falko Super Moderator ISPConfig Developer

    These are the default settings in 3.0.4.x, but they have been lowered in 3.0.5.
     

Share This Page