It's a bare metal FreeBSD 15 desktop with 2GB RAM and a dual core overclocked to 3.05GHz.
Running KDE and Firefox starts putting RAM under pressure, obviously. KDE starts flickering, taskbar disappearing/restarting, start menu not drawing correctly, flickering. Then KDE completely crashes to terminal oftentimes.
This is seen on both UFS and ZFS, although much worse on ZFS.
Setting vm.pageout_oom_seq to higher value than default (from 12 to 1200) actually improves things on UFS to the point of usability, it seems, but does not work much on ZFS. I also tried to lower ZFS ARC memory limit to 500MB or to 1500MB but seeing the same problems.
Interestingly, at the default vm.pageout_oom_seq of 12 swap is NOT used at all when problems happen. At a higher setting of 120 and 1200 swap does start get to be used, but swap is used to some small percent of maybe 10-12%, and the problems begin even when there's a lot of swap space available.
It seems the kernel is not handling OOM conditions properly. There's some major screwing up going on that can crash stuff. It's consistently reproducible on this older desktop - and the same setup works great on my 32GB RAM machine (that's usually not utilizing all of RAM for now). This is not reliable! There's gotta be a way to never kill any memory when there's a lot of unused swap space available or something.
Running KDE and Firefox starts putting RAM under pressure, obviously. KDE starts flickering, taskbar disappearing/restarting, start menu not drawing correctly, flickering. Then KDE completely crashes to terminal oftentimes.
This is seen on both UFS and ZFS, although much worse on ZFS.
Setting vm.pageout_oom_seq to higher value than default (from 12 to 1200) actually improves things on UFS to the point of usability, it seems, but does not work much on ZFS. I also tried to lower ZFS ARC memory limit to 500MB or to 1500MB but seeing the same problems.
Interestingly, at the default vm.pageout_oom_seq of 12 swap is NOT used at all when problems happen. At a higher setting of 120 and 1200 swap does start get to be used, but swap is used to some small percent of maybe 10-12%, and the problems begin even when there's a lot of swap space available.
It seems the kernel is not handling OOM conditions properly. There's some major screwing up going on that can crash stuff. It's consistently reproducible on this older desktop - and the same setup works great on my 32GB RAM machine (that's usually not utilizing all of RAM for now). This is not reliable! There's gotta be a way to never kill any memory when there's a lot of unused swap space available or something.