One of the questions you often will be faced with operating a Linux-based system is managing memory budget. If a program uses more memory than available you may get swapping to happen, oftentimes with a terrible performance impact, or have Out of Memory (OOM) Killer activated, killing process altogether.
Before adjusting memory usage, either by configuration, optimization, or just managing the load, it helps to know how much memory a given program really uses.
If your system runs essentially a single user program (there is always a bunch of system processes) it is easy. For example, if I run a dedicated MySQL server on a system with 128GB of RAM I can use “used” as a good proxy of what is used and “available” as what can still be used.
root@rocky:/mnt/data2/mysql# free -h …[Read more]