Miguel G

Well-Known Member
Jun 4, 2015
86
0
6
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
 

Miguel G

Well-Known Member
Jun 4, 2015
86
0
6
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
 

Miguel G

Well-Known Member
Jun 4, 2015
86
0
6
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
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!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463

Miguel G

Well-Known Member
Jun 4, 2015
86
0
6
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.