From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 9 12:59:34 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 87FE86A1 for ; Wed, 9 Oct 2013 12:59:34 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from mail-we0-x22c.google.com (mail-we0-x22c.google.com [IPv6:2a00:1450:400c:c03::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 16CF324C1 for ; Wed, 9 Oct 2013 12:59:33 +0000 (UTC) Received: by mail-we0-f172.google.com with SMTP id q58so877268wes.17 for ; Wed, 09 Oct 2013 05:59:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=wccFRot738vIN1ub3HwdWyI/BK++nHUdXjlg8POuSVc=; b=Guev8lB/nXLMjYiYBlGsXFD+XlycpEvKHro+DFIIAVStFr03PC41Sxd7yCBScvSD1T e9kz5IEosabvZnvY8/cFFCAxvyXsVcOSVKyDu+5pvLF0NdN3g+F5ZJ1aXrzM48PRj9Mm HvyuhaQ2VmXpjpusszS0nlC51hFhWvK3kh44RGahMnarTL/qMxbjDEjrDp7Zks+wCUIr +bP5zoI32HMKTuVNuNLi93M39IxELHUQc6AaUaaWdZzg2LmkH5S0vpxhj5seRhr7RUZR Qwp/oRH5cnlOtjZPhKXlZK3OEPqxdxymxfkrJrUYVZnLZaTSFkmVOM5QEiZSQ7OZIJHR cEbg== X-Received: by 10.194.118.169 with SMTP id kn9mr986264wjb.71.1381323572413; Wed, 09 Oct 2013 05:59:32 -0700 (PDT) Received: from gumby.homeunix.com (87-194-105-247.bethere.co.uk. [87.194.105.247]) by mx.google.com with ESMTPSA id gp9sm15073520wib.8.1969.12.31.16.00.00 (version=SSLv3 cipher=RC4-SHA bits=128/128); Wed, 09 Oct 2013 05:59:31 -0700 (PDT) Date: Wed, 9 Oct 2013 13:59:28 +0100 From: RW To: freebsd-hackers@freebsd.org Subject: Re: Call fo comments - raising vfs.ufs.dirhash_reclaimage? Message-ID: <20131009135928.702f1910@gumby.homeunix.com> In-Reply-To: References: <20130828181228.0d3618dd@ernst.home> <201309031507.33098.jhb@freebsd.org> <20131008063433.GA47506@x2.osted.lan> <20131008233806.54bb0483@gumby.homeunix.com> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.19; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Oct 2013 12:59:34 -0000 On Tue, 8 Oct 2013 16:01:25 -0700 Davide Italiano wrote: > This could be probably changed -- from what | see even under high > memory pressure this wasn't a problem but all in all I agree with you > that we shouldn't loop forever but limit the number of pass on the > list to a somewhat constant number, to prevent pathological cases. I don't see any need to loop. > > I don't believe that's true. Under most circustances the existing > > scheme free more memory. The only case when yours frees more is > > when 90% of the entries are locked. > > Well, no. Here you can set the threshold to a more aggressive value so > that you reclaim more memory every time. Note that this was not > possible in the previous version, so, if you could have a situation > where all your cache entries were not touched for 15 or even 30 > seconds they would have kept around, and you can destroy up to 10% of > them everytime lowmem event is called. Outside of contrived stress tests I think it's very rare for a significant fraction of the cache to have been accessed in the last minute - particularly on large caches where this matters most.