Date: Thu, 11 Jan 2001 12:34:42 -0800 From: Alfred Perlstein <bright@wintelcom.net> To: "Brian J. McGovern" <bmcgover@cisco.com> Cc: hackers@FreeBSD.ORG Subject: Re: Question about 'open' files.... Message-ID: <20010111123442.H7240@fw.wintelcom.net> In-Reply-To: <200101112026.f0BKQJ406592@bmcgover-pc.cisco.com>; from bmcgover@cisco.com on Thu, Jan 11, 2001 at 03:26:19PM -0500 References: <20010111122147.E7240@fw.wintelcom.net> <200101112026.f0BKQJ406592@bmcgover-pc.cisco.com>
next in thread | previous in thread | raw e-mail | index | archive | help
* Brian J. McGovern <bmcgover@cisco.com> [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 <fcntl.h> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010111123442.H7240>