Report this

What is the reason for this report?

swap not used though memory full

Posted on January 21, 2021

Hello,

I found on Centos7, memory utilization is above 90% still swap is 0 mb in use.

[xxx@z ~]$ free -m
              total        used        free      shared  buff/cache   available
Mem:           7682        1457         151         155        6073        5772
Swap:          7935           0        7935



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

The important measure is the available which in your case is 5772MB. So nearly 75% of your memory is available.

Only if your available memory is full, only then the system will start writing to the swap.

Also very important side note, I would really not advisable having such a huge swap file, as if the system starts storing so much information in swap it could really slow things down.

Regards, Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.