increasing nagios performance with ram fs

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
eltrasimaco
Posts: 75
Joined: Thu Aug 02, 2012 7:15 am

increasing nagios performance with ram fs

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: increasing nagios performance with ram fs

Post 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.
Former Nagios Employee
eltrasimaco
Posts: 75
Joined: Thu Aug 02, 2012 7:15 am

Re: increasing nagios performance with ram fs

Post 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?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: increasing nagios performance with ram fs

Post 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.
Former Nagios employee
erilane
Posts: 5
Joined: Fri Feb 17, 2017 8:28 pm

Re: increasing nagios performance with ram fs

Post 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?
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: increasing nagios performance with ram fs

Post 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?
Previous Nagios employee
eltrasimaco
Posts: 75
Joined: Thu Aug 02, 2012 7:15 am

Re: increasing nagios performance with ram fs

Post 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.
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: increasing nagios performance with ram fs

Post 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.
Previous Nagios employee
eltrasimaco
Posts: 75
Joined: Thu Aug 02, 2012 7:15 am

Re: increasing nagios performance with ram fs

Post by eltrasimaco »

Thanks everybody, I'll give it a try soon.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: increasing nagios performance with ram fs

Post 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.
Locked