2

As I have 128 GB of RAM, I wanted to minimize swap usage by setting vm.swappiness to 10.

I ran a bath (snakemake -j 1) of memory-heavy operations in Python: subtracting two arrays up to 15 GB each, then calculating norms of the difference. Surprisingly my system started to misbehave: Thunderbird crashed, then so did my graphic environment (XFCE with lightdm) effectively killing my screen session with the bath running. Now I wonder: why?

Moreover, my scripts tends to fail with segmentation faults when processing the biggest arrays. Also, after graphic environment respawned it swapped my monitors (pun intended) and did not allow me to re-swap them with Display settings. service lightdm restart after sysctl vm.swappiness=60 was necessary.

I had plenty (932 GB) of swap available, so it is not that my system suddenly ran out of memory. RAM chips also seems to work (17 passes of Memtest86+ revealed no error).

I ask about the reason behind crashes of other programs (Thunderbird, screen session, graphic environment). Even if my programs were poorly written, I would expect their impact to be limited extensive swapping. A total XFCE session restart is something that definitively should not happen. And by restart I mean restart, not freezing or slowdown due to swapping.

abukaj
  • 485

1 Answers1

0

TL;DR: It does not seem to.

The problem was with badblocks at swap partition which may or might not be related to the reduced swappiness. Someone more experienced may tell, whether swappiness affect disk wear.

I have succesfully ran my bath with vm.swappiness=0. 4h ago I started another bath with vm.swappiness=10 - so far everything is working fine. If system starts to misbehave (and no badblocks are found) I will update the answer.

abukaj
  • 485