I get alert emails whenever swap usage is at 100%. In my case, swap usage doesn't reduce later on (even though memory is free) so I get an alert email every hour.
How can I reduce swap usage without rebooting my Linux server?
I get alert emails whenever swap usage is at 100%. In my case, swap usage doesn't reduce later on (even though memory is free) so I get an alert email every hour.
How can I reduce swap usage without rebooting my Linux server?
You can run swapoff -a
as root to swap all memory back in. Don't forget to run swapon -a
afterwards to make swap available again. Note that swapoff
will fail if there is not enough physical memory available to swap everything back in.
I don't have an enough free RAM to clear swap space, then how can i troubleshoot it. please help me on it.
total used free shared buff/cache available
Mem: 31G 24G 4.7G 203M 1.7G 5.8G Swap: 23G 23G 13M
cat /proc/sys/vm/swappiness
10