From owner-freebsd-fs@FreeBSD.ORG Tue Jun 8 07:26:04 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AED6A1065672 for ; Tue, 8 Jun 2010 07:26:04 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id F2B808FC1F for ; Tue, 8 Jun 2010 07:26:03 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA13343; Tue, 08 Jun 2010 10:25:57 +0300 (EEST) (envelope-from avg@icyb.net.ua) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1OLtC9-000KOw-4E; Tue, 08 Jun 2010 10:25:57 +0300 Message-ID: <4C0DF084.6090106@icyb.net.ua> Date: Tue, 08 Jun 2010 10:25:56 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.24 (X11/20100603) MIME-Version: 1.0 To: Artem Belevich References: <20100607232909.GA57423@server.vk2pj.dyndns.org> In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org Subject: Re: ZFS memory usage X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2010 07:26:04 -0000 on 08/06/2010 03:14 Artem Belevich said the following: > I believe it's pagedaemon's job to push pages from active list to > inactive and from inactive down to cache and free. > I have a really ugly hack to arc.c which forces pagedaemon wakeup if > ARC sees too much memory on inactive list. > How much is too much is defined by a sysctl value. > > http://pastebin.com/ZCkzkWcs > > Be warned: it's ugly, it may not work, it assumes too much, it's plain > broken, it may ... > I'm serious -- I have seen my box locking up when I did manage to > exhaust memory. The only reason I'm posting this ugliness at all is > bacause of hope that someone more familiar with memory allocation in > FreeBSD may be able to suggest better approach. I think it's a good start. I did a much more primitive thing locally and even that improved thing for me a lot - I simply dropped "(vm_paging_target() > -2048" check. Kip Macy is aware of this situation, perhaps he'll look into resolving it. -- Andriy Gapon