Are Unix tools just slow?

It seems that there is some misconception of what it means for something to be
stored in a tree (B*-tree really). In HFS the B*tree is a tree on disk. When
traversing the tree (if it is traversed on disk) random access is required,
regardless of whether the nodes are considered files. That is, the odds of the
children of any given node being contiguous to it or each other is quite small,
and the odds of any leaf nodes being contiguous on disk (despite being next to
each other in the tree) is also quite slim. Relations in the tree are stored
by numeric links to other locations in the segment of disk containing the tree.
Seeking, moving heads, etc is still required for the most part. The minimum
size of this tree for a filesystem of 100,000 files is 50MB, since the minimum
node size is 512 bytes.

The difference between other filesystems is entirely dependent on granularity
of caching in each fs, and probably many other things, not just how the
directory structure is stored. The optimisation goals are by and large the
same, so will just take a different form. There are cases in other OSs where
an entire tree will be retained in memory (if it is exported via NFS on linux,
for example).

If this B*tree is really cached entirely in memory all the time the speed is a
different story, and I know very little about how HFS+ is implemented, so can’t
speak to this aspect.

references:
http://developer.apple.com/techpubs/mac/Files/Files-99.html#HEADING99-0

···

On Thu, Jun 20, 2002 at 01:29:10PM +0900, Chris Gehlker wrote:

This depends entirely on the file system. There are systems where a
directory is just a node in a tree. There are other systems in which the
directories are just special files that are actually stored in disk sectors
like any other file. In these latter systems, walking the file system will
involve opening, reading and closing each directory which in turn involves
moving heads and waiting for the disk to revolve.


moved

rather like a fairy land, isn’t it…

Sorry, I should have read the FAQ on FAM. It needs kernel 2.4 or greater.
I’m running 2.4.18 so I’m home free.

hey there,
thanks for the reply.
i’m a newbie and the opengl doco’s in japanese
so i’m a bit at a loss. i am hitting the unix and c books
pretty hard now that i have a bit of free time, but it’ll
probably be a little while before i get the hang of what is going
on behind the scenes, so the help is very
much appreciated. but, to answer your question:

no i haven’t installed the glut package.
wouldn’t the fact that there is no leading
slash in front of GL (

glut.c:8: GL/glut.h: No such file or directory

) indicate that
it is looking for it in the same directory as
the opengl stuff?

It’s looking for it to be in one of the -I paths (like, for instance,
/usr/local/include/GL/glut.h)

…i had the glut stuff installed?
how/where do i change the include path?
is this a ruby glut library?

Well, a lot of the answer would depend on what operating system you’re
using (you didn’t say).

Assuming you’re running Linux, you’d want to make sure you’d loaded
the glut and glut-devel packages.

How you load packages depends on your operating system.

On a Red Hat system, you’d use RPM, and you’d install the two packages
off (probably) the Disc 2 of the distribution.

···

On Saturday 15 June 2002 11:00 pm, ccos wrote:


Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE

Shame on me for oversimplifying for someone who is going to read references.
The B* tree is necessarily always cached but a list of FSCatalogInfoPtrs is
kept in an operating-system queue for fast searching.

A decent start from the users perspective is here:
http://developer.apple.com/techpubs/macosx/Carbon/Files/FileManager/File_Man
ager/Functions/Searching_a__log_Iterator.html#//apple_ref/c/func/FSCatalogSe
arch

For more of a how it works writeup, see:
http://developer.apple.com/techpubs/mac/Files/Files-107.html#HEADING107-0
Although it’s old.

···

On 6/20/02 3:18 PM, “Kyle Rawlins” rawlins@cs.umass.edu wrote:

If this B*tree is really cached entirely in memory all the time the speed is a
different story, and I know very little about how HFS+ is implemented, so
can’t
speak to this aspect.


As an adolescent I aspired to lasting fame, I craved factual certainty, and
I thirsted for a meaningful vision of human life - so I became a scientist.
This is like becoming an archbishop so you can meet girls. -Matt Cartmill,
anthropology professor and author (1943- )

hey,

thanks much. i’ve actually decided to defer
my ruby studies until after i have learned C and UNIX,
which is unfortunate, but neccesary methinks.
learning these was on my todo list regardless,
and i’m enjoying C quite a bit, but it’d be
great if i and others could take advantage of ruby and all the
extras people have written for it, w/o neccesarily having to know
these other things.

it would be really good for fledgling programmers,
and help out the popularity of ruby a lot if there were
binary packages available for different platforms.
kind of like squeak or any smalltalk, (which i learned on).
it would be such a good language
to learn programming and oop with, because
it is as clean and well designed as smalltalk, and can
easily be extended and used to ‘script’ lower level stuff.
but unlike smalltalk it is becoming more and more of an asset to know
in the marketplace. would anybody be up for setting up a site where one
could download
binaries of everything? i would be glad to help out with
it in any way that i could. (i do web design work)

best,
c

···

On Monday, June 17, 2002, at 12:23 AM, Ned Konz wrote:

On Saturday 15 June 2002 11:00 pm, ccos wrote:

hey there,
thanks for the reply.
i’m a newbie and the opengl doco’s in japanese
so i’m a bit at a loss. i am hitting the unix and c books
pretty hard now that i have a bit of free time, but it’ll
probably be a little while before i get the hang of what is going
on behind the scenes, so the help is very
much appreciated. but, to answer your question:

no i haven’t installed the glut package.
wouldn’t the fact that there is no leading
slash in front of GL (

glut.c:8: GL/glut.h: No such file or directory

) indicate that
it is looking for it in the same directory as
the opengl stuff?

It’s looking for it to be in one of the -I paths (like, for instance,
/usr/local/include/GL/glut.h)

…i had the glut stuff installed?
how/where do i change the include path?
is this a ruby glut library?

Well, a lot of the answer would depend on what operating system you’re
using (you didn’t say).

Assuming you’re running Linux, you’d want to make sure you’d loaded
the glut and glut-devel packages.

How you load packages depends on your operating system.

On a Red Hat system, you’d use RPM, and you’d install the two packages
off (probably) the Disc 2 of the distribution.


Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE

Nothing says you can’t do more than 1 thing. Besides, c and unix[en]
are very much a lifetime of exploration and discovery. If you wait
on ruby till you’re “done”, you’ll never start.

Don’t get me wrong, what you’re doing is certainly worthy and kudos
to you for starting it!

···

— ccos ccos@bigpond.com wrote:

hey,

thanks much. i’ve actually decided to defer
my ruby studies until after i have learned C and UNIX,
which is unfortunate, but neccesary methinks.

=====

Yahoo IM: michael_s_campbell


Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

in the marketplace. would anybody be up for setting up a site where
one could download binaries of everything?

I don’t think I’ll ever be able to reach ``everything’', but I’m
starting to work on that. :slight_smile:

i would be glad to help out with it in any way that i could. (i do
web design work)

Just web design or also web development? The service itself is not
built upon web services (see recent messages about rpkg/rapt), but a
web interface would still be a Good Thing ™.

Massimiliano

···

On Wed, Jun 19, 2002 at 05:53:15PM +0900, ccos wrote:

Michael Campbell wrote:

···

— ccos ccos@bigpond.com wrote:

thanks much. i’ve actually decided to defer
my ruby studies until after i have learned C and UNIX,
which is unfortunate, but neccesary methinks.

Nothing says you can’t do more than 1 thing. Besides, c and unix[en]
are very much a lifetime of exploration and discovery. If you wait
on ruby till you’re “done”, you’ll never start.

For me, it worked through pain. Two weeks of learning Java resulted in
two things:
a) I never touched it again;
b) I fell in love with Ruby, and everything felt easy
in comparison to Java :wink:

Tobi


http://www.pinkjuice.com/