• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Very high memory usage

Amin Taheri

Golden Pleskian
Plesk Certified Professional
Hello,

Our plesk server in production has 2GB of Ram installed, and nearly all of it is in use.

$ free -m
total used free shared buffers cached
Mem: 2024 1898 126 0 198 1274
-/+ buffers/cache: 425 1599
Swap: 1983 2 1981

On our dev box with the exact same setup but with no clients it has slighly lower usage

$ free -m
total used free shared buffers cached
Mem: 2026 1172 853 0 127 829
-/+ buffers/cache: 215 1811
Swap: 1983 0 1983


Why is our memory usage at over a gig when idle? Are there anything you can recomend to have this be lowered? Our memory usage in production box is always averaging at 90% or higher usage.

Thanks in advance
 
"Free memory" is kind of confusingly named. Your real "free" or usable, available memory is unused memory (aka "free") + cached. So according to your output there you have 126M "free" + 1274M cached, or 1400M of available memory.

Cached memory is actually better than free, what that means is that the libraries, files, etc are already in memory, just like query caching in mysql. If you want to use it again, its there and it wont try to load from the disk again. If you dont, then it just dumps it and gives you the memory from the cache.

Swap is going to get used for what are called "anonymous mappings". That is for data that has no associated files on the disk (like the mysql query cache for example). This is one of the ways that the kernel cleans up after itself. So even if you had 64G of ram, you still might end up with a few megs in the cache just from those anonymous mappings. Its nothing to be concerned about.

Last but not least, 64-bit systems will consume a lot more memory than 32-bit systems. So I always double the amount of ram I use on 64-bit boxes over the 32-bit ones.
 
Back
Top