Alfred Perlstein([EMAIL PROTECTED])@2001.07.30 16:07:17 +0000:
> * Alfred Perlstein <[EMAIL PROTECTED]> [010730 16:01] wrote:
> [re: speeding up freeing of space when using softupdates]
> > 
> > If you want to accellerate the release of blocks issue a couple
> > of sync(1) commands:
> > 
> > sync;sync;sync;
> > 
> > which will 'accelerate' the free'ing of space, actually it will 
> > accellerate the writing of the meta data that will actually free
> > up the space.
> 
> Let me add that this will not _really_ accelerate the process, it
> may give you instant gratification where you'll see a bunch of
> space, but by issuing a sync you're actually going to slow down
> the removal of files in the long run.  Basically for speed you
> don't want to issue a sync until the rm command completes, if at
> all since the sync will also muck with other disk activity.
> 

isn't all this behaviour controlled by vfs.ffs.doasyncfree ?

root@nGENn:defiler[/sys]28# grep -rsi doasyncfree ./ufs
./ufs/ffs/ffs_alloc.c:static int doasyncfree = 1;
./ufs/ffs/ffs_alloc.c:SYSCTL_INT(_vfs_ffs, FFS_ASYNCFREE, doasyncfree,
CTLFLAG_RW, &doasyncfree, 0, "");
./ufs/ffs/ffs_alloc.c:   * strict correctness, the `doasyncfree' flag
should be set to zero.
./ufs/ffs/ffs_alloc.c:   * The test on `doasyncfree' should be changed
to test a flag
./ufs/ffs/ffs_alloc.c:          if (doasyncfree)
./ufs/ffs/ffs_alloc.c:          if (!doasyncfree)
./ufs/ffs/ffs_alloc.c:          if (doasyncfree)
./ufs/ffs/ffs_extern.h: { "doasyncfree", CTLTYPE_INT },

from ffs_alloc.c:
        /*
         * Next we must write out the modified inode and indirect blocks.
         * For strict correctness, the writes should be synchronous since
         * the old block values may have been written to disk. In practise
         * they are almost never written, but if we are concerned about
         * strict correctness, the `doasyncfree' flag should be set to zero.
         *
         * The test on `doasyncfree' should be changed to test a flag
         * that shows whether the associated buffers and inodes have
         * been written. The flag should be set when the cluster is
         * started and cleared whenever the buffer or inode is flushed.
         * We can then check below to see if it is set, and do the
         * synchronous write only when it has been cleared.
         */

cheers,
/k

-- 
> MCSE: Minesweeper Consultant & Solitaire Engineer
KR433/KR11-RIPE -- WebMonster Community Founder -- nGENn GmbH Senior Techie
http://www.webmonster.de/ -- ftp://ftp.webmonster.de/ -- http://www.ngenn.net/
karsten&rohrbach.de -- alpha&ngenn.net -- alpha&scene.org -- [EMAIL PROTECTED]
GnuPG 0x2964BF46 2001-03-15 42F9 9FFF 50D4 2F38 DBEE  DF22 3340 4F4E 2964 BF46
Please do not remove my address from To: and Cc: fields in mailing lists. 10x

PGP signature

Reply via email to