Performance tuning with ''swappiness''
The
swappiness parameter controls the tendency of the kernel to move processes out of physical memory and onto the swap disk. Because disks are much slower than RAM, this can lead to slower response times for system and applications if processes are too aggressively moved out of memory.
- swappiness can have a value of between 0 and 100
- swappiness=0 tells the kernel to avoid swapping processes out of physical memory for as long as possible
- swappiness=100 tells the kernel to aggressively swap processes out of physical memory and move them to swap cache
- Ubuntu uses a default setting of swappiness=60
Reducing the default value of
swappiness will probably improve overall performance for a typical Ubuntu desktop installation. A value of
swappiness=10 is recommended, but feel free to experiment.
Note: Ubuntu server installations have different performance requirements to desktop systems, and the default value of
60 is likely more suitable.
Bookmarks