Re: swap_pager: cannot allocate bio

From: Chris Ross <cross+freebsd_at_distal.com>
Date: Mon, 15 Nov 2021 18:17:28 UTC

> On Nov 15, 2021, at 10:08, Andriy Gapon <avg@freebsd.org> wrote:
> My point was that waiting for the free memory was not strictly needed yet given 12G free, but that's kind of obvious.

I am kind of curious about this.  You were noting Andriy that there was free emory.  Is there any way to confirm if this is a NUMA issue, and if it is, would there be any way around it?  Mark, you mentioned making that less strict as a general improvement, but not a real fix to the issue that’s hitting me here.  I am curious if you thought it was still worth making.  It sounds like it to me.  I mean, allocating memory at all sounds better than failing to allocate memory.  Are there cases where that wouldn’t be true?

> Yes, I propose to remove the wait for ARC evictions from arc_lowmem().
> 
> Another thing that may help a bit is having a greater "slack" between a threshold where the page daemon starts paging out and a threshold where memory allocations start to wait (via vm_wait_domain).
> 
> Also, I think that for a long time we had a problem (but not sure if it's still present) where allocations succeeded without waiting until the free memory went below certain threshold M, but once a thread started waiting in vm_wait it would not be woken up until the free memory went above another threshold N.  And the problem was that N >> M.  In other words, a lot of memory had to be freed (and not grabbed by other threads) before the waiting thread would be woken up.

Thank you both for your inputs.  Let me know if you’d like me to try anything, and I’ll kick (reboot) the system and can build a new kernel when you’d like.  I did get another procstat -kka out of it this morning, and the system has since gone less responsive, but I assume that new procstat won’t show anything last night’s didn’t.

                  - Chris