Date: Tue, 5 Sep 1995 10:20:57 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: kallio@jyu.fi (Seppo Kallio) Cc: luigi@labinfo.iet.unipi.it, questions@freebsd.org Subject: Re: Why "finger" takes so long ? Message-ID: <199509051720.KAA23606@phaeton.artisoft.com> In-Reply-To: <v01530520ac71e5c1ac28@[130.234.41.39]> from "Seppo Kallio" at Sep 5, 95 03:07:01 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199509051720.KAA23606>