I see some memory leak on my server (Ram memory usage too high). My server specification for 50 network device are:
CPU: Intel Xeon E5-2698 V4 @ 2.2GHz x4 core
Physical Memory (RAM): 12GB
SWAP Memory: 27GB
This is a VM machine. I`m concerned about memory leak. I have done RRD Tunning as described on the online docs section from the beginning but nothing changed. Please, can you help me with this? because is very frustrating. Do I need to add more RAM or there is something else that I need to do first?
Someone can correct me if I am wrong but I believe Linux by default will cache anything and everything it can to help speed up processes. If the memory is needed it will drop things from cache pretty fast to free it up. You actually want things cached like this instead of loading from disk every time.
Ok understood. But If i will load more devices like 100 do I need more RAM or it
s ok with 12Gb ram? I dont see any hardware recommendation for this system.
Have a look at swap use (or not). As long as swap is not in use, you are safe.
You cannot count the devices cause monitoring a switch with 500+ interfaces does not eat the sames ressources as a dumb home router.
12 Gb of RAM allows us to monitor 250+ devices, with a lot of switches (stacks) and some with 200+ interfaces.
Thank you Pipo Canaja. Network that I`m monitoring has 40 switch with 48 1/10Gb ports (many of them are in stack). The only concern for me was high memory usage. In fact, I increased swap to 27 Gigs to have more memory but is not using it at all.
2 or 4 Gigs of swap would be more than enough to identify if swap is used or not, and conclude if you need to increase or not the RAM. But again, seeing your description, you are probably quite OK.
Other facts that influence the RAM usage :
- Number of parallel pollers and discovery
– discovery can take as much time as needed so I would run only one in your case, and keep the 24 hours interval
– For pollers, it really depends on the polling interval (did you keep default 5 minutes ?) I run a test server on a raspberry Pi with 4G ram, no swap, and 20 smallish devices monitored, and the raspberry is only working for 30 seconds every 5 minutes…
- Polling time of a single device depends also on network latency, so if you poll devices far away, then polling takes more time, and you need to do more in //, resulting in more RAM usage.
This is my cron.d. Yes, every 5 minutes.
If you see any wrong setting in cron.d or something that I should change pleas tell me.
To give you an example, we are monitoring 330 devices and 18,000 ports with 32Gb of ram. No swap space used and 1 poller. (we are getting 2 more pollers online although it only takes 185 sec to poll)
@Andi_Andu : Nothing wrong here. You gave a lot more memory than needed to your VM, and a lot more swap that needed as well. So you can cut both, and check that swap is still not used.
I would suggest :
- 8Gb RAM
- 2Gb Swap
- 12 instead of 16 on the poller-wrapper.py line
Thanks Pipo. No I have resoruces is not a problem. I will leave it as it is. I changed poller-wrapper.py to 12 on cron.d.