Hi Stefan,

>> Every few days, my desktop runs out of RAM, and this usually happens while
>> web browsing.
>
> What exactly makes you think the problem is that it ran out of RAM?
--snip--
> If your problem is due to a lack of free RAM, I'd expect the OOM to do
> its job at some point and I'd also expect the machine get slower
> somewhat gradually. So, before hanging, does your machine "feel slower
> and slower and slower"?

Good question!

The hanging behavior is like a step function: the computer goes from being 
fully responsive to completely unresponsive; I don't don't see the swap bar in 
the System Load Monitor increase, which is strange.  I have experienced slow 
swap behavior before, but usually there I have intermittent control to Ctrl+Q 
programs and recover out of the slowness at time scales on the order of a few 
tens of seconds.

Your thought about swap inspired me to check whether my swap partition is 
functional.  I don't know how to empirically test that swap works and only know 
to reading /etc/fstab where I do see that I have a swap mount point present.  
`apropos swap` led me to check systemd's swap.target which I also see is 
active, and also see the corresponding swap volume in systemctl.  This 
resembles my laptop setup where I know the swap partition works there, from the 
rare occasions where I seeing its swap bar move in the XFCE System Load Monitor 
panel plugin.


>> I wait for as much as an hour and a half, but just see the
>> screen as frozen the way it was at the time of the hang. 8 GB RAM is
>> installed in it, and it's running Debian 10.
>
> I do regular email+web on 3GB machines on a regular basis, so if your
> machine "swaps to death" despite 8GB of RAM, either you're visiting web
> sites which use up a lot more RAM than the ones I visit (that's
> definitely possible), or you're hitting a bug that may be unrelated to
> the amount of free RAM.

This is a great insight.  I've hit my share of graphics card bugs over the 
years.  A few years ago I was bitten by an Intel IOMMU related graphical bug on 
my laptop which I worked around with a kernel parameter tweak.  In earlier 
years, similar story with nvidia and nouveau drivers.

What's also unusual about this desktop is it's my first attempt using encrypted 
ZFS on Linux for personal work, and I've noticed that ZFS uses a lot of RAM.  
Even when I have no significant applications running in my desktop I suspect it 
can grow to use as much as half my RAM, but because the ZFS kernel processes 
register RAM usage as 0 in the process managers like htop, etc, it's usually 
difficult to directly quantify the effect and I only suspect it's heavy memory 
use from previous experience using XFCE without ZFS.  I have a setup nearly 
identical to 
https://openzfs.github.io/openzfs-docs/Getting%20Started/Debian/Debian%20Buster%20Root%20on%20ZFS.html
 and am using the latest zfs version 0.8.4-2~bpo10+1.


> My crystal ball says that you're not running out of RAM, but you're
> hitting a nasty bug instead. I hope I'm wrong.

I think it might be prudent to seek help from the ZFS folks to see what they 
say.  Maybe something is misconfigured with using the ZFS swap partition and 
there might be some ZFS related logging I could collect to better understand 
what's going on.

Perhaps there's a ZFS bug or misconfiguration that happens before the 
OOM-killer has the chance to be involked.  The encryption support is a 
relatively new feature and I wonder how it behaves with swap.

Thank you for all your thoughtful questions and insights!


> Stefan

Pariksheet

Reply via email to