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.

High memory usage

Discussion in 'Workarounds and Optimization' started by Miguel G, Feb 16, 2017.

Tags:
  1. Miguel G

    Miguel G Active Member

    Joined:
    Jun 4, 2015
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Twitter:
    I have Centos 6.8 with WHM 62 updated to the latest version.

    I have suphp as php handler for PHP 5.6 and 7.0. I have just installed fcgi for PHP 7.1 and opcache and do some tests to see if I can improve speed.

    I have followed these instructions:

    Apache Module: FCGId - EasyApache 4 - cPanel Documentation

    I´m not seeing any speed improvement by using Opcache with a https site I´m using for testing and I´m checking the server configuration. It´s a VPS with 19 Gb of RAM.

    I have noticed nscd dns cache service is taking around 2 Gb of RAM (versus 800 Mb when restarted). I have set the restart interval to 1 hour but still the service RAM usage is growing so it seems the service is not being restarted.

    I also have noticed two httpd processes that are eating up around 2 Gb of RAM each (even after restarting httpd service):

    22821 nobody 20 0 1929m 78m 8320 S 5.0 0.4 0:17.57 1.7g httpd
    22994 nobody 20 0 1929m 77m 8364 S 5.6 0.4 0:18.29 1.7g httpd

    And also I see a huge memory reserved for caching:

    root@myserver [~]# free -ah
    total used free shared buffers cached available
    Mem: 18G 18G 377M 140M 825M 13G 0B
    -/+ buffers/cache: 4.0G 14G
    Swap: 3.9G 154M 3.7G

    even if my swappiness is set to 25
     
  2. Miguel G

    Miguel G Active Member

    Joined:
    Jun 4, 2015
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Twitter:
    By the way, my apache settings:

    Start Servers 5
    Minimum Spare Servers 5
    Maximum Spare Servers 10
    Server Limit 256
    Max Request Workers 50
    Max Connections Per Child 1000
    Keep-Alive On
    Keep-Alive Timeout 5
    Max Keep-Alive Requests 100
    Timeout 100
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,171
    Likes Received:
    1,295
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  4. Miguel G

    Miguel G Active Member

    Joined:
    Jun 4, 2015
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Twitter:
    Thanks for your input.

    But still nscd service is eating up memory, some people suggest to restart it every hour but I´m wondering if there is any better solution.

    Anyway, the main issue here is:

    - Opcache and FCGI not offering much improvement in terms of speed.
    - 2 Httpd processes using almost 4 Gb of RAM.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,171
    Likes Received:
    1,295
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Feel free to open a separate thread for the NSCD issue and we can take a closer look. It's typically not a problem if your server is utilizing RAM due to the nature of how memory is utilized, unless you are noticing performance issue or reaching the memory limit.

    Thanks!
     
  6. Miguel G

    Miguel G Active Member

    Joined:
    Jun 4, 2015
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Twitter:
    Ok, I will.

    Is there any information about how to configure properly fcgi? Do I need to enable php-fpm in MultiPHP Manager? I feel that I´m missing information.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,171
    Likes Received:
    1,295
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  8. Miguel G

    Miguel G Active Member

    Joined:
    Jun 4, 2015
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Twitter:
    I have already referred to that fcgi documentation in my thread.

    there isn´t the claim that this implementation surpases in speed to suphp? I´m now testing php-fpm with opcache to see if it is better in terms of speed.
     
Loading...

Share This Page