From owner-freebsd-questions Tue Sep 5 10:27:06 1995 Return-Path: questions-owner Received: (from majordom@localhost) by freefall.freebsd.org (8.6.11/8.6.6) id KAA06423 for questions-outgoing; Tue, 5 Sep 1995 10:27:06 -0700 Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.6.11/8.6.6) with ESMTP id KAA06417 for ; Tue, 5 Sep 1995 10:27:03 -0700 Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id KAA23606; Tue, 5 Sep 1995 10:20:57 -0700 From: Terry Lambert Message-Id: <199509051720.KAA23606@phaeton.artisoft.com> Subject: Re: Why "finger" takes so long ? To: kallio@jyu.fi (Seppo Kallio) Date: Tue, 5 Sep 1995 10:20:57 -0700 (MST) Cc: luigi@labinfo.iet.unipi.it, questions@freebsd.org In-Reply-To: from "Seppo Kallio" at Sep 5, 95 03:07:01 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1764 Sender: questions-owner@freebsd.org Precedence: bulk > 2:14pm@itu:~% time finger kallio > Login: kallio Name: Seppo Kallio > Directory: /export/lk/kallio Shell: /usr/local/bin/tcsh > On since Tue Sep 5 14:12 (EET DST) on ttyp0 from zaphod.maccc.jyu > No Mail. > 0.249u 1.666s 0:32.25 5.8% 21+439k 1926+14io 0pf+0w > 2:15pm@itu:~% > > I have 1776 accounts but idle node, not many users yet. For explicit fingers, you should up the size of your name cache. The name cache hash size is calculated by adding maxproc to vm_object_cache_max in vfs_subr.c. The name cache size before reuse is dictated by the number of vnodes currently in the cache, and the number of vnodes in the cache prior to reuse is once again relative to maxproc. Probably what is happening is that the directory is large enough that the full set of directory entries in the home directory that contains the users for your system isn't in cache all at once. Basically you can bounce NPROC higher and this will effectively increase the hash size and the number of vnodes in the vnode cache, or you can divide your home directory so that all your users aren't in one directory, or you can avoid the stat in the finger code and hope that that is sufficient (probably won't be in your particular case). It's a generally good idea to have /home broken up into multiple directories instead of running all the users in the same directory in any case. ie: /home/u1/joe /home/u1/john /home/u2/tom /home/u2/ted ... Finger will only traverse a u1 or u2 directories worth of entries into the cache at a time -- no help for a general finger, but a lot for a specific one. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.