Linux Servers - memory monitoring demystified
November 13, 2018
Linux servers have unique performance and usage metrics. What are the critical metrics that should be tracked with Linux Server monitoring software? Let’s investigate.
Having reliable information about the system memory used is vital for capacity planning, maintaining the integrity of your servers and more.
As the one responsible for maintaining the systems that runs the business applications and services, System Administrators need to monitor their memory consumption constantly.
Linux-specific memory metrics
The amount of memory that can be used by programs. The value is obtained by subtracting a few reserved bits and the kernel binary code from the amount of physical RAM available on the system.
The physical memory not used by any programs. It is normal for the Free memory to be a small percentage of the Total memory - even if the amount of Free memory is relatively low it is considered to be quite normal, but it is still a good idea to keep an eye on the critical thresholds.
The amount of memory used for passing data between programs - a program can store some data in the shared memory, and other programs (when permitted) can access this data. You can check what the maximum allowed is using ipcs -lm, and monitor if the current amount of Shared memory used reaches this limit.
The memory used by kernel buffers for temporarily storing the metadata of the files and data residing under the page Cache. Usually there is no need to monitor the Buffers memory, since it is freed automatically when needed.
The memory used by the page cache. Keeping a page cache in (otherwise unused) portions of the main memory allows quicker access to the contents of cached pages, thus improving the overall performance of the system. As with the Buffers memory, there is usually no need to monitor the Cache memory, but is nonetheless valuable to have insights into the status.
A value calculated by subtracting the amount of Buffers, Cache, and Free memory from the Total memory. Since it is normal for the Used memory to be close to the Total memory, there is no need to monitor if the amount of used memory is high. As with Cache value, however, it is useful to have insights into this metric.
The estimated amount of memory that can be used for starting new programs without swapping. The mechanism for calculating the Available memory is part of the Linux kernel.
It is important to monitor the available memory, and set up appropriate notification when it gets low, so that preventative measures and corrective actions can be taken.
In general, for Linux, it is recommended to monitor if the available memory falls to a small percentage of the total memory, for instance 5% or less. You might also monitor the shared memory consumption, and optionally consider changing the maximum allowed shared memory on the system.
Start monitoring with CloudRadar today.
You will get insights into all critical several metrics - including memory - by installing a small and secure open source agent on your systems.
Set up in 5 minutes, and monitor all your servers - as well as your entire infrastructure (servers, networks and websites). With guided setup and pre-configured checks, getting started with monitoring has never been simpler.
Free 15 Day Trial. No credit card required. Then choose from our simple pricing plans.
Author: Rossen Karaivanov