Subject: Re: Symlink ownership (let's go back)
To: None <greywolf@tomcat.VAS.viewlogic.com, Jarle.Greipsland@idt.unit.no>
From: Captech) <greywolf@tomcat.VAS.viewlogic.com (James Graham>
Date: 08/09/1995 09:59:54
#: From Jarle.Greipsland@idt.unit.no Wed Aug 9 03:35:35 1995
#: To: firstname.lastname@example.org
#: Cc: current-users@NetBSD.ORG
#: Subject: Re: Symlink ownership (let's go back)
#: Date: Wed, 09 Aug 1995 12:34:21 +0200
#: From: Jarle Fredrik Greipsland <Jarle.Greipsland@idt.unit.no>
#: In article <9508082019.AA19749@tomcat.vas.viewlogic.com>, greywolf@tomcat.VAS.viewlogic.com (James Graham (Captech)) writes:
#: > #: A quick check of a machine running NetBSD-1.0/i386 shows that there
#: > #: are 26927 symlinks. Speed is definitely wanted for symlinks :-).
#: > Okay, but what would the funny dirent business buy us?
#: I have no idea. My intention was just to point out that not all
#: system has `only a few symlinks'. The number above provides a data
#: point for what someone out there (here?) is doing with symlinks, and I
#: thought that anyone making modifications to NetBSD should at least
#: _know_ this. And no, I don't think any added/removed/modified
#: features should be based on this number alone. But still, the number
#: is there, and I would prefer not to see the system `evolve' into
#: something that can no longer handle it. That is, if someone want to
#: mess around with the dirent structures, they ought to think about the
#: consequences not only for a directory with perhaps 10-20 symlinks in
#: it, but also consider what would happen if the directory contains
#: 1200-1300 symlinks. (/store/bin on one of the machines on campus
#: contains 1253 symlinks with average `data' length (the file being
#: pointed to) of 52 characters.)
I think that, given that symlinks in directories which consist of ALL sym-
links will at least double (likely more!) the size of a directory, and
seeing that directories are kept relatively small on purpose (there are
always exceptions, so don't bother telling me that!), putting symlinks in
the directories themselves would be tantamount to having directory entries
consist of full pathnames, which, of course, would be patently absurd.
Anything is worth experimenting, but be sure to hit "worst case". These
days, "average usage" is closer to "worst case" than to "median usage".
Best case scenarios aren't even worth approaching, since best case would
be one or two symlinks per directory, with reasonably short lengths. The
time measurements would be negligible.
Worst case would be a heavily loaded machine with many directories chock
full of symbolic links with pathnames that could pave the road to hell
#: I haven't messed with the dirents so I
#: can't say what will happen, other than that the directory itself may
#: start to get awfully big. Good? Bad? I don't know, but I hope
#: the performance of any proposed change will be measured, and
#: the results evaluated properly.
#: `People who think MSDOS & Windows are the slickest thing since sliced butter
#: should be forced to wear a sign stating "This mind intentionally left blank"'
#: -- email@example.com