
Something changed since our upgrade regarding Linux memory usage. Immediately after our upgrade, our Linux servers started reporting high memory usage. Prior to upgrade we averaged around 15% memory utilization. Post upgrade we're averaging around 95% memory utilization.
After reviewing the servers, I think this is a miscalculation on Solarwinds' part because the servers aren't really utilizing this much memory. Has anyone else seen this?
I can confirm this as well. See below graph of memory utilization on an example Linux server. All of my Linux systems are like this. It looks like the memory calculations were changed from used memory (minus buffers/cache) to total used memory (including disk buffer caches). That means all Linux systems will always be around 95% memory utilization all the time (not accurate). Why was this changed?
[root@xxxxxxx ~]# free -m
total used free shared buffers cached
Mem: 2026 1249 776 0 218 797
-/+ buffers/cache: 233 1792
Swap: 2047 0 2047
Hi Andrew,
I am looking at what changed in 10.0, but according to your free - m command, the Memory has
2026 total
1249 used
= ~62% utilization
Your chart seems to accurately show this. It looks like our change in calculation is more correct. The fact that we are seeing the memory utilization move around is a good sign too (it is not just staying at 95% util). Can you confirm or deny my observation?
Thanks
Works again! Thanks!
Karlo, the older (pre v10) memory calculation is actually more accurate.
The memory management in Linux is interesting. Linux always allocates as much RAM as possible. Linux always wants to “fill up” unused memory with a disk/memory cache to speed up IO. But, that cache is dynamic and will shrink if an application uses it. So, that number is deceiving. The best way to describe it is with an example:
Let’s say I have 1000MB of RAM in a server and 200MB is in use by running applications. That leaves 800MB free. Linux will automatically cache frequently accessed files from the hard drive in this 800MB of free space and use as much as possible. So, if you look at the results of the free command, it will show 200MB in use by applications, 800MB in use by the disk buffer cache, and 0MB free. Now let’s say I start another application that needs 100MB of RAM, that is not a problem. Linux dynamically shrinks the disk cache to 700MB and allocates the memory to that new application. So, now we have 300MB in use by applications, 700MB in the disk cache, and still 0MB free. Now, how much free space do you have? It’s not an easy answer. There is 300MB in use by applications, so I would argue 30% of the memory is in use. But, the disk cache it taking up the rest of the memory, so technically, it is in use. But, if an application needs that space, it can have it, so it is used but avalible.
Back to my server:
Available memory = total memory - used application memory
Available memory = 2026 - 233 = 1793MB free or 11.5% used
References:
http://chrisjohnston.org/2009/why-on-linux-am-i-seeing-so-much-ram-usage
http://salomie.ro/wiki/index.php/Linux_Free_Command
http://technopark02.blogspot.com/2004/09/linux-finding-out-amount-of-free-used.html
Any other Linux/Unix experts out there want to chime in here?
I'm convinced. Let me look to see what all changed.
Thanks
Any updates?
We made some tweaks in RC2 to this, which should be coming out very soon
The Linux memory checks work perfect in v10 R2. Thanks again guys!
Thanks for the confirmation andrew. For others that saw the same issue, please let us know how it worked for you.