I have the following setup: Gentoo Linux, kernel 4.19.52, AMD Ryzen 5 1600, 16G of RAM (of which up to 8G is used as ramdisk - mounted as tmpfs). I have also set up 32G of swap partition. The following issue has been with me for like half a year and a couple of kernels.
When I compile relatively large applications like chromium or firefox, eventually (like half an hour into compilation) my system becomes unresponsive. From what I have managed to observe, it seems the system starts to swap heavily (the kswapd is using significant % of the CPU), but to my surprise, the actual swap space is almost unused. It looks like for some reason the system runs out of RAM but also does not want to use the swap space.
Any hints or ideas on what to look for? Debugging of the issue is somehow difficult, as everything runs smoothly for like 30-60 mins until it "almost" hang (by that I mean the mouse moves like 1 inch per 30 secs) - which make it also unobservable :(
Maybe someone have come across this issue? I'll be grateful for any tips...
Base /proc/meminfo output available at: https://pastebin.com/SQJ49mhD its difficult to capture it during the "problem state" as the system becomes unresponsive - I'm unable to do anything except for hard "power off"