NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/57558: pgdaemon 100% busy - no scanning (ZFS case)



The following reply was made to PR kern/57558; it has been noted by GNATS.

From: Chuck Silvers <chuq%chuq.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: kern/57558: pgdaemon 100% busy - no scanning (ZFS case)
Date: Thu, 3 Aug 2023 09:27:50 -0700

 On Thu, Aug 03, 2023 at 08:45:01AM +0000, kardel%netbsd.org@localhost wrote:
 > 	Patch 1:
 > 		let ZFS use a correct view on KVA memory:
 > 		With this patch arc reclaim now detects memory shortage and
 > 		frees pages. Also the ZFS KVA used by ZFS is limited to
 > 		75% KVA - could be made tunable
 > 
 > 	Patch 1 is not sufficient though. arc reclaim thread kicks in at 75%
 > 	correctly, but pages are not fully reclaimed and ZFS depletes its cache
 > 	fully as the freed and now idle page are not reclaimed from the pools yet.
 > 	pgdaemon will now not trigger pool_drain, as uvm_km_va_starved_p() returns false
 > 	at this point.
 
 this patch is not correct.  it does not do the right thing when there
 is plenty of KVA but a shortage of physical pages.  the goal with
 previous fixes for ZFS ARC memory management problems was to prevent
 KVA shortages by making KVA big enough to map all of RAM, and thus
 avoid the need to consider KVA because we would always run low on
 physical pages before we would run low on KVA.  but apparently in your
 environment that is not working.  maybe we do something differently in
 a XEN kernel that we need to account for?
 
 
 > 	To reclaim the pages freed directly we need
 > 	Patch 2:
 > 		force page reclaim
 > 	that will perform the reclaim.
 
 this second patch is fine.
 
 -Chuck
 


Home | Main Index | Thread Index | Old Index