Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Jun 2000 00:50:09 -0700
From:      Don Lewis <Don.Lewis@tsc.tdk.com>
To:        "Daniel O'Connor" <doconnor@gsoft.com.au>, Luigi Rizzo <luigi@info.iet.unipi.it>
Cc:        hackers@FreeBSD.ORG, "Nicole Harrington." <nicole@unixgirl.com>
Subject:   Re: How many files can I put in one diretory?
Message-ID:  <200006220750.AAA07430@salsa.gv.tsc.tdk.com>
In-Reply-To: <XFMail.000622171146.doconnor@gsoft.com.au>
References:   <XFMail.000622171146.doconnor@gsoft.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Jun 22,  5:11pm, "Daniel O'Connor" wrote:
} Subject: Re: How many files can I put in one diretory?
} 
} On 22-Jun-00 Luigi Rizzo wrote:
} >  that sounds insane! Because a name is a name, why dont they call
} >  those files xx/yy/zz/tt.html and the like, to get down to a more
} >  reasonable # of files per directory.
} >  
} >  Or use a single file and a cgi which extracts things from the right place.
} >  In such a context, i assume that the best place to do the name lookup
} >  is in the app, not in the kernel.
} 
} Yeah.. This is why databases where invented :)
} 
} FYI 40000 in a directory really makes directory listings slow.. 2 million would
} suck :)

Only if directory lookups use a sequential search.  Not all filesystem
implementations sequentially scan directory entries.  Some use btrees or
other ways of quickly finding the desired directory entry.  Even so,
you probably still would want to avoid doing an "ls" or an "echo *" ;-)

I'd recommend looking at how squid stores its disk cache.  It has a
very similar performance problem to solve.


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?200006220750.AAA07430>