Date created: 08/22/12 17:37:48. Last modified: 08/31/20 09:16:11

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: Last Login
Next page: MOTD Script