Article View: news.software.nntp
Article #18308Re: Fastrm is a PIG
From: Joe Greco
Date: Fri, 06 Jun 1997 00:00
Date: Fri, 06 Jun 1997 00:00
32 lines
2075 bytes
2075 bytes
In news.software.nntp article <5n7qei$7dm@news.webspan.net>, gpalmer@SPAM.webspan.net (Gary Palmer) wrote: :In article <5n6c9q$m2g@news.bu.edu>, : cball@bu.edu (Charles Ball) writes: :> When system/kernel time is high, it is likely that you have some very :> thousands of files in control, junk, misc.jobs.offered, etc. Actually, :> if you've ever had a leak, the directory file doesn't shrink when the :> articles are finally removed; : :Actually, not *QUITE* true. 4.4BSD derrived systems can truncate :directories. : :NOTE: A file (in this case `a') had to be created *BEFORE* the kernel : truncated the directory. Damned if I know exactly why, I haven't : looked too deeply into UFS/FFS since 4.3BSD net2 I believe that's because the only time the entire directory is guaranteed to be traversed is at file _creation_ time. An unlink simply searches the directory to reach the file in question (or the whole directory if it does not exist). An open-for-write, however, forces the directory to be scanned to see if the filename already exists. If not, you've just traversed the entire directory, and will be creating the file, and along the way you could have noted if the directory was a candidate for truncation. So I believe, IIRC, that the truncation feature was piggybacked on top of file creations, so that the feature did not require (much) extra work to be done. "Cool 'ey" ... JG
Technical Details
Message-ID:
<5n9h77$p8a$1@earth.execpc.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<338209E6.76EA@MBnet.MB.CA> <5n6c9q$m2g@news.bu.edu> <5n7qei$7dm@news.webspan.net>Show Full Headers
Complete Article Headers
Message-ID: <5n9h77$p8a$1@earth.execpc.com> Subject: Re: Fastrm is a PIG Date: Fri, 06 Jun 1997 00:00:00 +0000 From: jgreco@ns.sol.net (Joe Greco) References: <338209E6.76EA@MBnet.MB.CA> <5n6c9q$m2g@news.bu.edu> <5n7qei$7dm@news.webspan.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 246585862 Sender: jgreco@earth.execpc.com Organization: sol.net Network Services - Milwaukee, WI Newsgroups: news.software.nntp