Swap: Difference between revisions

From Halfface
Jump to navigation Jump to search
(Created page with "=How to handle swappiness= Start top and press O then p to sort by swap. top -c Look at what is using swap. si and so is swap in and swap out. vmstat 1 To return swap to ram...")
 
Line 6: Line 6:
To return swap to ram.
To return swap to ram.
  swapoff -a; swapon -a
  swapoff -a; swapon -a
See swappiness value.
cat /proc/sys/vm/swappiness
To set swippiness value.
sudo sysctl vm.swappiness=0

Revision as of 14:44, 29 August 2019

How to handle swappiness

Start top and press O then p to sort by swap.

top -c

Look at what is using swap. si and so is swap in and swap out.

vmstat 1

To return swap to ram.

swapoff -a; swapon -a

See swappiness value.

cat /proc/sys/vm/swappiness

To set swippiness value.

sudo sysctl vm.swappiness=0