Page 1 of 1
XI , NRDS and Apache performance
Posted: Mon Jan 11, 2016 1:28 pm
by arnab.roy
Hi All,
All of our checks are coming via NRDS and although the load average on the server is bellow 1 most of the times, I am finding the UI is sluggish when a large number of checks are pouring in via apache.
I tried looking at php fpm or something like that, but because of source guardian I dont think I can use it.
Any specific things you guys can suggest that can be tweaked ?
Re: XI , NRDS and Apache performance
Posted: Mon Jan 11, 2016 1:54 pm
by rkennedy
How is your memory usage? Can you run the command top|head -5 and post the output? To give us a better understanding, how many NRDS checks do you have running?
I wonder if it's apache that is hanging due to all over the sockets being open with NRDS.
Re: XI , NRDS and Apache performance
Posted: Mon Jan 11, 2016 2:09 pm
by arnab.roy
Hi ,
I dont think we have a memory issue
top - 19:06:09 up 47 days, 22:08, 2 users, load average: 0.39, 0.43, 0.48
Tasks: 277 total, 1 running, 276 sleeping, 0 stopped, 0 zombie
%Cpu(s): 3.3 us, 0.9 sy, 0.0 ni, 95.1 id, 0.8 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 8011340 total, 1970772 free, 669056 used, 5371512 buff/cache
KiB Swap: 7986172 total, 7776132 free, 210040 used. 6630832 avail Mem
As you can see load in near nominal. In terms of checks coming in we have about 68 hosts with 1000 services in total.
Just wondering if we can fork out more apache processes or may be seperate the nrds processing to a different apache daemon may be..(just thinking out aloud)
Re: XI , NRDS and Apache performance
Posted: Mon Jan 11, 2016 3:30 pm
by rkennedy
Nope, no memory issue. I did want to make sure you had memory available prior to tweaking your apache settings though. Do you notice anything in your apache logs relating to apache limits?
You should be able to tweak your prefork / worker limits in your httpd.conf to handle a bit more load if that's the throttle, they will look similar to below -
Code: Select all
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# ServerLimit: maximum value for MaxClients for the lifetime of the server
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000
</IfModule>
# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule worker.c>
StartServers 4
MaxClients 300
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
I can't give any advise as to what you'd want to change it to exactly, as every environment is different. Modifying this is out of scope of what we can support though. But, you may be able to optimize this section for your Nagios machine specifically by changing the above.