Date created: Wednesday, August 22, 2012 5:37:48 PM. Last modified: Saturday, May 22, 2021 11:09:51 AM

Memory Tuning

Enabling swap partition;

/dev/sda3 swap swap defaults 0 0

Write data and drop page cache, dentries and inodes

echo 3 > /proc/sys/vm/drop_caches

Adjusting memory cache ratios:

# Page out applications as little as possible
sysctl -w vm.swappiness=1
echo "vm.swappiness=1" >> /etc/sysctl.conf
# or
# echo 0 > /proc/sys/vm/swappiness
# Favour inode/dentry cache instead of block cache
sysctl -w vm.vfs_cache_pressure=50


Previous page: Make Bootable USB
Next page: MOTD Script