From owner-freebsd-hackers Tue May 9 13:13:29 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mimer.webgiro.com (mimer.webgiro.com [212.209.29.5]) by hub.freebsd.org (Postfix) with ESMTP id D5F4E37C310 for ; Tue, 9 May 2000 13:09:57 -0700 (PDT) (envelope-from abial@webgiro.com) Received: by mimer.webgiro.com (Postfix, from userid 66) id C45882DC0B; Tue, 9 May 2000 22:13:05 +0200 (CEST) Received: by mx.webgiro.com (Postfix, from userid 1001) id 76A4A7817; Tue, 9 May 2000 22:06:22 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mx.webgiro.com (Postfix) with ESMTP id 7476510E17; Tue, 9 May 2000 22:06:22 +0200 (CEST) Date: Tue, 9 May 2000 22:06:22 +0200 (CEST) From: Andrzej Bialecki To: seva@mtelecom.ru Cc: freebsd-hackers@freebsd.org Subject: Re: what is /etc/[s]pwd.db stay for? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 9 May 2000, Vsevolod Semenov wrote: > > pw showuser shows user tens times slowly then > grep user /etc/[master.]passwd DB files provide you with already parsed and indexed information, more suitable for use in API. grep can't perform many operations from getpw* family... also, the library routines getpw* would have to parse /etc/passwd each time you call them... Try to increase hashsize when using pw and related utilities. It makes a real difference in speed for large user databases. > > pwd_mkdb can't create [s]pwd.db files for 1000000 users. I believe we still have a limit of 65535 user ids in many places in the system, although uid_t is in fact u_int32_t. Or...? > > what reason to use db stuff in libc/gen/getpwent.c? Speed and efficiency :-) Andrzej Bialecki // WebGiro AB, Sweden (http://www.webgiro.com) // ------------------------------------------------------------------- // ------ FreeBSD: The Power to Serve. http://www.freebsd.org -------- // --- Small & Embedded FreeBSD: http://www.freebsd.org/~picobsd/ ---- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message