On Thu, Sep 02, 2004 at 04:40:43PM -0600, Danny MacMillan wrote:
> Hi.
> 
> I googled for this but I couldn't find an answer.
> 
> What is the largest number of files that can exist
> in a single directory in FreeBSD?  I ask because
> I'm using courier-imap using a Maildir mailbox
> and I started seeing all kinds of errors when
> trying to copy more than 16383 messages into one
> of my folders there.  I'm retrieving mail from a
> pop3 server using Outlook then copying them into
> my imap folder, also using Outlook.
> 
> I guess my real question is, what is the bottleneck
> in this situation?  Outlook?  courier-imap?  Or
> FreeBSD?

I don't think there is any limit to how many files you can have in a
single directory - or, if there is some limit, the limit is very large:
on the order of hundreds of thousands of files or more (at which point
directory operations would extremly slow anyway so nobody in his right
mind would have so many files in a single directory.)

There is a limit to how many subdirectories you can have in a single
directory - that limit is 32765.  This is tied to the how many
hardlinks you can have to a single directory entry (32767: the value is
stored in the inode as a signed 16-bit value) and every subdirectory
contains a hardlink to its parent (the ".." entry.)


Anyway, if you run into trouble when trying to copy more than 16383
messages, then it is not FreeBSD which is to blame.
Personally I would bet on Outlook being the culprit, but then I am a
bit prejudiced against all Microsoft products.


-- 
<Insert your favourite quote here.>
Erik Trulsson
[EMAIL PROTECTED]
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to