From owner-freebsd-fs@freebsd.org Tue Nov 3 09:04:56 2015 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 03FAAA1E0F9 for ; Tue, 3 Nov 2015 09:04:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id DA18C1BE1 for ; Tue, 3 Nov 2015 09:04:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id DAA50A1E0F8; Tue, 3 Nov 2015 09:04:55 +0000 (UTC) Delivered-To: fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA433A1E0F6 for ; Tue, 3 Nov 2015 09:04:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53BC81BDE for ; Tue, 3 Nov 2015 09:04:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id tA394o5D080675 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 3 Nov 2015 11:04:50 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua tA394o5D080675 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id tA394m8T080673; Tue, 3 Nov 2015 11:04:48 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 3 Nov 2015 11:04:48 +0200 From: Konstantin Belousov To: Kirk McKusick Cc: Bruce Evans , fs@freebsd.org Subject: Re: an easy (?) question on namecache sizing Message-ID: <20151103090448.GC2257@kib.kiev.ua> References: <20151102224910.E2203@besplex.bde.org> <201511030447.tA34lo5O090332@chez.mckusick.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201511030447.tA34lo5O090332@chez.mckusick.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Nov 2015 09:04:56 -0000 On Mon, Nov 02, 2015 at 08:47:50PM -0800, Kirk McKusick wrote: > You seem to be proposing several approaches. One is to make > wantfreevnodes bigger (half or three-quarters of the maximum). > Another seems to be reverting to the previous (freevnodes >= wantfreevnodes > && numvnodes >= minvnodes). So what is your proposed change? Free vnodes could be freed in the soft fashion by vnlru daemon, or in hard manner, by the getnewvnode(), when the max for the vnode count is reached. The 'soft' way skips vnodes which are directories, to make it more probable that vn_fullpath() would succeed, and also has threshold for the count of cached pages. The 'hard' way waits up to 1 sec for the vnlru daemon to succeed, before forcing a recycle for any vnode, regardless of the 'soft' stoppers. This causes the ticking behaviour of the system when only one vnode operation in single thread succeeds in a second. Large wantfreevnodes value is the safety measure to prevent the tick steps in practice. My initial reaction on the complain was to just suggest to increase desiredvnodes, at least this is what I do on machines where there is a lot of both KVA and memory and intensive file loads are expected.