Page 1 of 1

increasing nagios performance with ram fs

Posted: Thu Feb 16, 2017 6:07 am
by eltrasimaco
Hi, I read somewhere that, to increase nagios performance, the status.dat and some other files should be located in ramdisk.
Centos and RHEL have the /run directory running in ram
Is it advisable to move those files into /run ? Or should I make a custom one? and why?
Thanks in advance

Re: increasing nagios performance with ram fs

Posted: Thu Feb 16, 2017 10:31 am
by rkennedy
It's hard to say what files / paths are in use since you're using Nagios Core, but we generally create it's own place for the ram disk to go on XI. The same framework of these instructions should work, but you'll need to adjust paths based on your setup.

https://assets.nagios.com/downloads/nag ... giosXI.pdf

The ram disk is really nice as it'll allow faster reading / writing for a lot of the temp files Nagios depends on. I would set up it's own custom ramdisk for the sake of isolation.

Re: increasing nagios performance with ram fs

Posted: Fri Feb 17, 2017 2:04 am
by eltrasimaco
Thanks loads; we shutdown the nagios server each two or three days, so, if we put status.dat and other files in ramdisk (caches and other) , they will disappear in each reboot; does this affect anything?

Re: increasing nagios performance with ram fs

Posted: Fri Feb 17, 2017 3:09 pm
by tmcdonald
You'll want to copy those to disk before the shutdown and restore them back to the RAM disk upon reboot. Otherwise you will end up with your checks in a "pending" state each time and lose acknowledgements, comments, etc. (stored in retention.dat). Not the end of the world, but probably something to avoid.

Re: increasing nagios performance with ram fs

Posted: Fri Feb 17, 2017 8:57 pm
by erilane
When I experimented with this, I saw no performance boost

My theory was that linux disk cache has everything in memory already anyway

Has anyone actually measured a performance boost from this?

Re: increasing nagios performance with ram fs

Posted: Mon Feb 20, 2017 12:17 pm
by avandemore
It is very unlikely that would result in a performance boost. Those files are already going to be in the FS cache. What performance problem are you trying to solve?

Re: increasing nagios performance with ram fs

Posted: Mon Feb 20, 2017 4:21 pm
by eltrasimaco
Nonetheless, the nagios doc (i read the same one rkennedy stated three posts above) says, along with some other things:

"Making use of local RAM disks can cause huge performance improvements on larger systems"

The system I'm thinking is about 6k services, single VM server.

Re: increasing nagios performance with ram fs

Posted: Mon Feb 20, 2017 4:39 pm
by avandemore
All services are different and a lot depends on what your VM is spec'd at as well but in general that is not a "large install". In that document most likely only /usr/local/nagios/var/spool is going to have much effect on IO performance, but you can try it and let us know. Also keep in mind, a RAMDisk does no good if your VM is under memory pressure.

Re: increasing nagios performance with ram fs

Posted: Tue Feb 21, 2017 3:36 am
by eltrasimaco
Thanks everybody, I'll give it a try soon.

Re: increasing nagios performance with ram fs

Posted: Tue Feb 21, 2017 1:48 pm
by dwhitfield
Please let us know how it goes.

I also know that there are performance improvements coming in Core, but I'm not sure if that's 4.4 or 5. The roadmap hasn't been updated since the release of 4.3 earlier today: https://www.nagios.com/roadmaps/ -- I didn't see anything performance related at https://github.com/NagiosEnterprises/na ... /Changelog but there are some bug fixes.