linux + how to know when swapoff -a should be ended

Posted on

linux + how to know when swapoff -a should be ended – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, memory, swap, , .

on my linux redhat machine I perform swapoff

in order to drop swap pages that stays in cached swap!

swapoff -a

I waiting until now one hour and swapoff still work

can we see some process or notification when swapoff should be ended ?

remark – swap size is 8G , and memory size is 60 G

Solution :

in order to trace the swapoff process run the command free

and see that after some time the total swap is decrease

in this way “total swap” should be nearly 0 when swapodd ended,

after swapoff ended perform swapon -a

example :

 free -g
                   total       used       free     shared    buffers     cached
  Mem:              58           35         23          0          0         24
    -/+ buffers/cache:           10         48
 Swap:              1            1           0

Leave a Reply

Your email address will not be published.