Summary: | Swap not working on core 122 | ||
---|---|---|---|
Product: | IPFire | Reporter: | Tim <ipfb> |
Component: | --- | Assignee: | Michael Tremer <michael.tremer> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | Major Usability | ||
Priority: | - Unknown - | CC: | michael.tremer |
Version: | 2 | ||
Hardware: | x86_64 | ||
OS: | All | ||
Attachments: |
Log extract showing OOM Killer in action
Proposed patch |
Description
Tim
2018-08-30 21:09:57 UTC
The swap beahviour shouldn't have changed, but we got a new kernel. You could try to play around with the vm.swappiness sysctl parameter which is set to 0. That used for prevent the kernel from swapping too early. Maybe this disables it entirely now. While Wikipedia articles need to be taken with a pinch of salt, there does appear to have been a change in the meaning of swappiness=0, although I would have expected the change to be in the old kernel as well. I'll try setting it to 1 and see what happens. https://en.wikipedia.org/wiki/Swappiness With swappiness=1 the rule update last night went through without any processes being killed, and with swap space being used. Looking at the references from the Wikipedia article, this one https://www.percona.com/blog/2014/04/28/oom-relation-vm-swappiness0-new-kernel looks to be best - especially since it includes details of the kernel change. If I'm reading it correctly, with swappiness=0 the kernel will swap memory, but can't handle the case where a sudden demand is made for more than the available amount of free physical memory - no matter how much swap space is available. The mystery is why this fairly old change should only have come into effect now, but perhaps with the old kernel my memory usage was just the right side of a boundary and the different memory requirements have pushed me across the boundary. Given that there are a number of tasks which can run suddenly on IPFire, perhaps the default value for swappiness should be 1? Yes, that sounds like a reasonable change. Would you submit a patch for this? OK. I've attached a patch. Created attachment 630 [details]
Proposed patch
Great, this looks good. Would you submit it to the mailing list, too? https://wiki.ipfire.org/devel/submit-patches When I do that it rejects the email 'You are not allowed to post to this mailing list' You will have to subscribe first and then you will be able to post to the list. Go to https://lists.ipfire.org for that. This has been shipped with c125. Thanks for working on this! |