Date: Fri, 08 Nov 2002 14:25:01 -0800 From: Terry Lambert <tlambert2@mindspring.com> To: vishal mittal <vm2908tml@yahoo.com> Cc: freebsd-fs@FreeBSD.ORG Subject: Re: Question regarding filesystem performance Message-ID: <3DCC39BD.53818C3E@mindspring.com> References: <20021108182420.5418.qmail@web13207.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
vishal mittal wrote: > I am working on a 4.4-RELEASE. I have about 30,000 1K > files in a directory. Any delete or move operation on > a file in this directory introduces unacceptable > delays in some other time-critical processes that I am > running on the machine. > > I am assuming that the delay is because of the large > number of files due to which it takes a longer time to > update the inode information and, delete and move > being atomic operations, they do not relinquish the > CPU for the other processes during that time. No. The delay is because in order to locate the files, it must do an average of 15,000 strncmp()'s on a hit, and 30,000 strncmp()'s on a miss. Use a hashed directory structure, instead. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3DCC39BD.53818C3E>