memory 8G, swap:8G


after adding 8G memory, the swap doesn't work

enter image description here

how can I activate it?

OS: CentOS 7, 64bit.

  • 1
    Use swapon to activate a newly created swap space.
    – heemayl
    Jan 17, 2017 at 4:57
  • 1
    Your swap is already active. Operating System will swap out memory pages that it doesn't need when it's necessary automatically Jan 17, 2017 at 5:23

2 Answers 2


The Swap is configured correctly and we can see it in the image posted.

There is no separate step to activate swap. Swap is used only when system runs out of RAM. Your system has enough RAM for all the running applications.

The image you have posted shows that there is 7.75GB of swap and not used.


You can confirm that swap is activated and how much is being used with:

swapon --show

As an aside, if you want to check memory usage without htop you can use:


That said, what you have already shown indicates that you likely do not have any problems with your swap.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .