On Sun, Aug 11, 2019 at 2:57 AM Georg Sauthoff mail@georg.so wrote:
On Fri, Aug 09, 2019 at 03:50:43PM -0600, Chris Murphy wrote: [..]
Problem and thesis statement: Certain workloads, such as building webkitGTK from source, results in heavy swap usage eventually leading to the system becoming totally unresponsive. Look into switching from disk based swap, to swap on a ZRAM device.
Summary of findings (restated, but basically the same as found at [2]): Test system, Macbook Pro, Intel Core i7-2820QM (4/8 cores), 8GiB RAM, Samsung SSD 840 EVO, Fedora Rawhide Workstation. Test case, build WebKitGTK from source.
[..]
To avoid such issues I disable swap on my machines. I really don't see the point of having a swap partition if you have 16 or 32 GiB RAM. Even with 8 GiB I disable swap.
Disabling swap doesn't avoid the issues, it can in fact make them worse.
If you have apps allocate memory they don't always OOM before the kernel tries to evict text pages, but since SSDs are fast it then tries to pull back in those text pages before realising (that is what most of the latest rounds of articles has been about). Something like firefox runs with no swap, starts to need more memory than the system has, parts of firefox executable get paged out, but then are needed for firefox to use the RAM, and round in circles it goes.
Having swap is still in this day and age better for your system that not having it.
Dave.