From owner-freebsd-current@FreeBSD.ORG Fri Aug 29 19:12:33 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F7D51065671 for ; Fri, 29 Aug 2008 19:12:33 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id D0AF88FC20 for ; Fri, 29 Aug 2008 19:12:32 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m7TJCPIk098064; Fri, 29 Aug 2008 15:12:26 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-current@freebsd.org, gary.jennejohn@freenet.de Date: Fri, 29 Aug 2008 11:40:29 -0400 User-Agent: KMail/1.9.7 References: <20080826124335.GD3305@carrot.paeps.cx> <20080827161940.1b4403ee@peedub.jennejohn.org> In-Reply-To: <20080827161940.1b4403ee@peedub.jennejohn.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808291140.30158.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Fri, 29 Aug 2008 15:12:26 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8117/Fri Aug 29 10:55:12 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.3 required=4.2 tests=AWL,BAYES_00, DATE_IN_PAST_03_06,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Subject: Re: Enormous utmp since mpsafetty X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2008 19:12:33 -0000 On Wednesday 27 August 2008 10:19:40 am Gary Jennejohn wrote: > On Wed, 27 Aug 2008 12:50:17 +0100 (BST) > Robert Watson wrote: > > > On Wed, 27 Aug 2008, Ollivier Robert wrote: > > > > > According to Gary Jennejohn: > > >> There are many more pseudo-ttys in /etc/ttys now. AFAIK utmp allocates an > > >> entry for every one of them at startup. > > > > > > utmp concepts are ancient. It is indexed by the tty/pty number so can grow > > > rather large but it should be a sparse one too. I remember talks about > > > replacing it with something a bit more modern. Backward compatibility is > > > assured through login(3) although it would break programs digging in the > > > utmp file itself. SVR4 had utmp/utmpx and setutline/getutline BTW... > > > > Right -- utmp growing to 256K would be an excellent example of utmp format > > inefficiency. On the other hand, utmp growing to 998M is probably an example > > of a bug rather than an inefficient design. freefall.FreeBSD.org, a > > relatively busy shell box, has a utmp of around 5k, so common use doesn't > > generally exercise that inefficiency... > > > > But freefall is running FreeBSD 7.0-STABLE #34: Sat Apr 12, so it doesn't > have the new tty stuff running, although I don't suppose that completely > explains the gigantic utmp which OT reported. The new pts entries are after all the 256 pty entries in /etc/ttys, so utmp may be larger becuase the pts entries are "later" in the file (higher offsets). However, if the file is sparse, then it doesn't actually hurt anything. -- John Baldwin