From nobody Thu May 20 06:44:20 2021 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6E7AE8C7F27 for ; Thu, 20 May 2021 06:44:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fm0Zw1803z4cQM; Thu, 20 May 2021 06:44:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from [192.168.0.88] (unknown [195.64.148.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: avg/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 63A8026729; Thu, 20 May 2021 06:44:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Subject: Re: The pagedaemon evicts ARC before scanning the inactive page list To: Alan Somers , Konstantin Belousov Cc: Mark Johnston , FreeBSD Hackers References: From: Andriy Gapon Message-ID: <4122a6cf-2da0-0816-96af-f2058d48435e@FreeBSD.org> Date: Thu, 20 May 2021 09:44:20 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.10.1 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit On 19/05/2021 23:28, Alan Somers wrote: > Follow-up: > All of the big inactive-memory consumers were files on FUSE file systems that > were being exported as CTL LUNs.  ZFS files exported by CTL do not use any res > or inactive memory.  I didn't test UFS.  Curiously, removing the LUN does not > free the memory, but shutting down the FUSE daemon does.  A valid workaround is > to set the vfs.fusefs.data_cache_mode sysctl to 0.  That prevents the kernel > from caching any data from the FUSE file system.  I've tested this on both > FreeBSD 12.2 and 13.0 .  Should the kernel do a better job of reclaiming > inactive memory before ARC?  Yes, but in my case it's better not to create so > much inactive memory in the first place.  Thanks for everybody's help, > especially kib's tip about "vmstat -o". Nevertheless, the larger problem still exists. I can confirm it on my system and right now I am not using fusefs at all. I do, however, use some programs that like to mmap some big data a lot. The current pageout + ARC reclaim code really oppresses the ARC. I think that Kostik and Mark made some good suggestion on how that can be fixed. -- Andriy Gapon