Timeline for What reasonable value of swappiness should I config to get better performance?
Current License: CC BY-SA 4.0
13 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 8, 2024 at 17:37 | comment | added | Philip Couling | @ArtemS.Tashkinov I do't recall having such a conversation perhapse you could link it. But I'be personally worked in contexts where swap does improve performance, particularly with low memory embedded devices. What you are describing is fine for web servers and database servers particularly, but it's wrong to claim that it's true for all computing contexts. | |
| Feb 8, 2024 at 15:56 | comment | added | Artem S. Tashkinov | @PhilipCouling We've had this conversation a couple of times already. Not a single Unix SE user has been able to provide a single scientific reproducible test which shows that SWAP actually increases performance. In the vast majority of cases it cannot and will not. It may allow more applications to run and in some corner cases it may allow to run something which otherwise would be impossible to run. But in the vast majority of cases adding more RAM is a million times more preferable than having SWAP enabled. It's deprecated tech with a ton of drawbacks. | |
| Feb 8, 2024 at 15:52 | comment | added | Artem S. Tashkinov | @aviro The whole swap thing was created decades ago when RAM was expensive as hell and computers needed to swap out to run the tasks they needed to run. I've had all my PCs and servers (over two hundred, executing hundreds of HTTP/DB requests every second) swapless for over 25 years now with zero issues and more performance to boot. Ha-ha, so funny. I really wanted to say something brutally offensive but I'll restrain myself. | |
| Feb 7, 2024 at 2:26 | vote | accept | morty morty | ||
| Feb 6, 2024 at 22:53 | comment | added | Philip Couling | @ArtemS.Tashkinov It's a bit like saying "McDonald's is the best resteraunt" because it's predictable and consistent the world over. If consistency is all you value (as common for sysadmins running K8s clusters) then that's fine. But it's certainly not true for all of computing, just as there are clearly better resteraunts than McDonalds. | |
| Feb 6, 2024 at 13:50 | comment | added | aviro | @ArtemS.Tashkinov if what you say is true, why did the kernel developers added this feature? Why have they decided to set the default value on 60? Why didn't they set the default to 0, if indeed it's the "best value"? Either they just generated random number, or they gave it some thought before and it has some reasoning behind it. Maybe you're right for some cases, but you shouldn't be so unequivocal. | |
| Feb 6, 2024 at 13:03 | comment | added | Artem S. Tashkinov | 0 or no swap at all is the best value. SWAP makes the system behavior unpredictable, introduces lags and increases latency. | |
| Feb 6, 2024 at 12:19 | comment | added | Philip Couling | As a general rule, you can guess that if something is configurable, there's no one "right" answer to what's best or simply "better". | |
| Feb 6, 2024 at 12:01 | answer | added | aviro | timeline score: 7 | |
| Feb 6, 2024 at 11:25 | history | edited | muru | CC BY-SA 4.0 | added 270 characters in body; edited tags; edited title |
| Feb 6, 2024 at 11:02 | history | edited | aviro | CC BY-SA 4.0 | added 6 characters in body; edited title |
| S Feb 6, 2024 at 5:57 | review | First questions | |||
| Feb 7, 2024 at 2:27 | |||||
| S Feb 6, 2024 at 5:57 | history | asked | morty morty | CC BY-SA 4.0 |