nadir wrote:I have already said that i don't understand sysctl.
That said:
I think it is the other way around than you said above.
- preload will help _if_ you got enough of RAM and load apps you use often.
I wouldn't know and Julian's guide doesn't comment on that. All I know is that on my old PII 233 MHz with 256 MB RAM preload helped a lot, so I presume it uses more swap.
nadir wrote:- The entry for sysctl in it's config will start to use _swap_ more early (assuming you have set it for that purpose).
Hmm, yes and no. For vm.swappiness, the lower the value, the more RAM it uses rather than swap.
The greater the value, the more swap it uses as opposed to RAM.
Your value is 10, so it's lower than the Debian default (60) and therefore will prefer RAM to swap by a large margin compared to vanilla Debian. If you want swap rather than RAM, you'd set it to a higher value.
With vm cache pressure, it's the other way around -- the lower the value, the more swapping. But let me quote Julian on that:
Le Julian wrote:We can choose a value between 0 and 100 where 0 means the kernel tries to keep everything in RAM and not cached to disk and 100 means it aggressively caches to disk to free RAM. The default in Debian is 60, which is OK but conservative. Laptop users should in any case use a low value to reduce writing to disk (because writing to disk negates benefits of power management and runs down your battery very quickly).
- Code: Select all
# echo 'vm.swappiness=20' >> /etc/sysctl.conf
The second change will affect the way the kernel frees caches of block devices vs filesystem entries. We'd prefer that when the kernel tries to free up cache it gets rid of cached block devices before cached filesystem entries, because having cached filesystem entries makes our filemanagers and other applications much more responsive than if they had to seek everything from the actual filesystem. This time we set a value for vm.vfs_cache_pressure, also in /etc/sysctl.conf. The default is 100, I don't know what the top limit might be but if you choose 0 your system may indulge in a horrible swapfest when handling large files. Try this:
- Code: Select all
# echo 'vm.vfs_cache_pressure=50' >> /etc/sysctl.conf

