From owner-freebsd-hackers Wed May 10 15:15:19 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from ns.mtelecom.ru (host3.mtelecom.ru [212.44.147.3]) by hub.freebsd.org (Postfix) with ESMTP id A168837B9B2 for ; Wed, 10 May 2000 15:15:14 -0700 (PDT) (envelope-from s@gw2.mtelecom.ru) Received: from gw2.mtelecom.ru (gw2.mtelecom.ru [192.168.3.2]) by ns.mtelecom.ru (8.8.5/8.8.5) with ESMTP id CAA03787; Thu, 11 May 2000 02:15:09 +0400 (MSD) Received: from localhost (s@localhost) by gw2.mtelecom.ru (8.9.1a/8.9.1) with SMTP id CAA23193; Thu, 11 May 2000 02:15:09 +0400 (MSD) Date: Thu, 11 May 2000 02:15:08 +0400 (MSD) From: Vsevolod Semenov X-Sender: s@gw2 Reply-To: seva@mtelecom.ru To: Andrzej Bialecki 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, Andrzej Bialecki wrote: > 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. I thought it is. before was asked for seting up 1000000 users site. > grep can't perform many operations from getpw* family... Example with grep is only demonstrate that search in text file more quick then db file with db rutines. > also, the library routines getpw* would have to parse > /etc/passwd each time you call them... of couse. It is not problem. > Try to increase hashsize when using pw and related utilities. It makes a > real difference in speed for large user databases. how much hash size need 1000000 users db? > > 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, what places? I found only pwd_mkdb. > although uid_t is in fact u_int32_t. Or...? > > what reason to use db stuff in libc/gen/getpwent.c? > Speed and efficiency :-) db rutines is only problem to seting up 1000000 users site. i'll replace getpwent.c in freebsd from linux. :). > 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 > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message