How to change the Swappiness of your Linux system
Hi,
How to change the Swappiness of your Linux system Quote:
|
The article you linked promotes terrible misinformation on the meaning and effect of swappiness.
Don't tweak what you don't understand. Quote:
A much more insightful simplification of the meaning of swappiness, would be to say that it represents the relative cost of spilling and reloading anonymous memory vs. non anonymous memory, where a swappiness of 100 implies equal cost and a swappiness of 0 implies non anonymous memory spills and reloads at zero cost. Using a single traditional hard drive, anonymous memory spills and reloads (through swap space) for on average twice the cost of non anonymous memory reloading from its file backing. A non symmetric performance media (flash) would tend to increase that two to one difference (so optimum swappiness would be lower than the default, but not as low as zero). Multiple and/or mixed media may have a complex impact, generally not worth micro managing. If most rereads are from flash (rather than traditional hard drive) lower swappiness for better performance. |
Member response
Hi,
As with most things there are always others who sense of how things should be setup; http://unix.stackexchange.com/questi...-60-by-default Quote:
Code:
~# cat /proc/sys/vm/swappiness Just my thoughts. |
swappiness is up there with loadavg - might have seemed like a good idea at the time. Pity no-one understands them.
I wonder if Linus regrets ever allowing either to be included. |
Quote:
I think the name of the parameter greatly increases the misunderstanding by those who think they know what it means. I don't know a good name. But if someone in control had regrets about the feature, it shouldn't be about having the feature. It should be about giving the feature a name that people think they understand. With an obscure name that no one understands, the feature would be just as useful and much less harmful. Long ago, very expensive servers might have expensive high-speed, low-capacity hard drives combined with other lower-speed higher-capacity drives, all with inadequate ram. Then placing swap on the faster drive and tuning swappiness above default would be a key performance tweak. With current hardware, I can't think of any reason for above default swappiness. But most systems that do their program loading from flash should have below default swappiness, and those which also have data files and/or swap in flash, even more so. |
All times are GMT -5. The time now is 04:45 PM. |