* Brian J. McGovern <[EMAIL PROTECTED]> [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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to