From owner-freebsd-hackers Thu Jan 11 12:35: 2 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 20BFD37B724 for ; Thu, 11 Jan 2001 12:34:42 -0800 (PST) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id f0BKYgI23932; Thu, 11 Jan 2001 12:34:42 -0800 (PST) Date: Thu, 11 Jan 2001 12:34:42 -0800 From: Alfred Perlstein To: "Brian J. McGovern" Cc: hackers@FreeBSD.ORG Subject: Re: Question about 'open' files.... Message-ID: <20010111123442.H7240@fw.wintelcom.net> References: <20010111122147.E7240@fw.wintelcom.net> <200101112026.f0BKQJ406592@bmcgover-pc.cisco.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200101112026.f0BKQJ406592@bmcgover-pc.cisco.com>; from bmcgover@cisco.com on Thu, Jan 11, 2001 at 03:26:19PM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Brian J. McGovern [010111 12:26] wrote: > Just for chuckles, try them in the same directory. That will emulate what > I've been doing here when having problems. I don't think so: #include int main(int argc, char **argv) { int x, i, counter; char buf[200]; char buffer[2048]; memset(buffer, '%', sizeof(buffer)); for (counter = 0; counter < 20000; counter++) { sprintf(buf, "files/%s%d", argv[1], counter); x = open(buf,O_CREAT | O_WRONLY); if (x == -1) { perror("open"); exit(1); } write(x, buffer, sizeof(buffer)); close(x); } return 0; } ~/tst % gcc t.c ~/tst % for i in a b c d e f g h ; do ./a.out $i & ; done ~/tst % find . | wc -l 26783 ... ~/tst % find . | wc -l 40524 Sure the directory ops start to get pretty slow once a UFS dir gets to be this size, but that's just a problem with UFS. I really can't reproduce this behavior here and can't suggest a fix unless you can come up with a test program of your own to produce it. sorry, -Alfred To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message