3 ms·
This looks like a bug. The kernel shouldn't raise OOM if there's swap available, the swappiness=0 should just make it not swap unless absolutely necessary. From
by ambrop7 12y ago
This looks like a bug. The kernel shouldn't raise OOM if there's swap available, the swappiness=0 should just make it not swap unless absolutely necessary. From my interpretation of the commit, it's supposed to improve the implementation in this respect. Quote:
"avoid swapping out pages of important process or process
groups while there is a reasonable amount of pagecache on RAM so that we can satisfy our customers' requirements."
But apparently it's deciding to not swap even when there isn't RAM available, failing to allocate, and not falling back to swap.
It's also possible the bug is only in the redhat kernel, due to the correctness of this commit depending on some other commit not backported.
- stingraycharles 12y agoI think thats a matter of taste. Not saying i'm disagreeing with you, but I can see the reasoning behind not swapping when you set swappiness to 0. Looking at the patch, it looks like swapiness=1 now does what the old 0 did. Would that not cover your use cass?
- ambrop7 12y ago"Looking at the patch, it looks like swapiness=1 now does what the old 0 did." Yeah, it seems, but the commit message, in my incomplete understanding, contradicts what you're saying. Also, I wouldn't feel so confident making claims about what the changes do, not without looking at the context and at least some understanding of that code.
- deleted 12y ago[deleted]
- ambrop7 12y agoI've just said how it's a bug, read my comment again. The commit message says it should only decide not to swap when there's enough RAM. The evidence in the article says otherwise. I'm not saying it's not a valid feature to avoid swapping at all and just use it for hibernation, just that this does not appear to be the intent of this commit.
- deleted 12y ago[deleted]