Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Oct 1998 20:50:03 -0400 (EDT)
From:      "Mr. K." <bsd@the.nu>
To:        freebsd-fs@FreeBSD.ORG
Subject:   Re: efficient filesystem (fwd)
Message-ID:  <Pine.BSF.4.02A.9810042049270.20218-100000@the.nu>

next in thread | raw e-mail | index | archive | help

On Mon, 5 Oct 1998, Terry Lambert wrote:

> > Do the directory breakout shuffle. Without something like VxVS (Veritas 
> > Filesystem, not available for non-commercial OSen unfortunately), which has 
> > some sort of hashed directory structure if I understand it right, then you are 
> 
> Actually, VxFS's directory code is lifted, pretty much verbatim, from
> the AT&T UFS (FFS) implementation.  It has AT&T Copyrights all over
> the sources.
> 
perhaps this is an old version you were looking at?
http://compassion.qualix.com/sysman/product/vxvm.htmld/vsm-over.html

"VxFS supports variable-length directory entries. Because file names may
be very long, rather than allocate a directory entry at maximum size,
wasting directory space and slowing access time, variable-length entries
are used.  However, these are less efficient to search than fixed-sized
entries, because you cannot know where the next entry begins. To eliminate
the need for a linear directory search, VxFS uses a hash table in each
directory extent to locate directory entries quickly, accelerating file
access."

> What you need, if you are going to do something so silly as to have
> a huge flat directory structure, is to implement a btree structured
> directory, like OS/2 HPFS.
> 
yes, I agree, and I was wondering if anyone had implemented something like
this for freebsd.  It's not worth it for me to implement it myself,
and I'm not about to waste money on something commercial.  Then again, if
you're hacking on top of u/h/ffs, the hashing strategy is probably easier.
I've also seen it done completely in the dnlc, which would keep complete
compatibility, but it takes up memory and you have to load in all the data
the first time you search each directory.

> My advice is to not do this; instead you should break it down.
> 
for now that's what I'll do but it's going to kludge up my cgi program
and I'll have to scale it manually as I grow, so eventually I'll get to
putting my files into a mysql database and have the webserver get the
files from there.

> The number of entries that have to be traversed to look up a directory
> entry is 512 div (average_file_name_length + 24) * number of blocks.
> 
> 
> 					Terry Lambert
> 					terry@lambert.org
> ---
> Any opinions in this posting are my own and not those of my present
> or previous employers.
> 



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?Pine.BSF.4.02A.9810042049270.20218-100000>