From owner-freebsd-questions Wed May 21 07:11:45 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id HAA11769 for questions-outgoing; Wed, 21 May 1997 07:11:45 -0700 (PDT) Received: from FNAL.FNAL.Gov (SYSTEM@fnal.fnal.gov [131.225.110.17]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id HAA11763 for ; Wed, 21 May 1997 07:11:43 -0700 (PDT) Received: from aduxb.fnal.gov ("port 54992"@aduxb.fnal.gov) by FNAL.FNAL.GOV (PMDF V5.0-5 #3998) id <01IJ4JSNIPMY0007KQ@FNAL.FNAL.GOV>; Wed, 21 May 1997 09:10:25 -0600 Received: from localhost by aduxb.fnal.gov (5.x/SMI-SVR4) id AA20046; Wed, 21 May 1997 09:10:17 -0500 Date: Wed, 21 May 1997 09:10:16 -0500 (CDT) From: Richard Neswold Subject: Re: rm is slow In-reply-to: To: Soren Dossing Cc: questions@FreeBSD.ORG Reply-to: neswold@FNAL.GOV Message-id: MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Content-transfer-encoding: 7BIT Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Wed, 21 May 1997, Soren Dossing wrote: > rm deletes files very slowly on my system, much slower than the files can > be created. It takes more than an hour to delete one GB of files. > > Why is that, and is there anything I can do to speed it up ? Because, by default, the FreeBSD file system makes sure that the disk is in a consistent state. So, for every file that is deleted, the file system runs through a procedure that, if interrupted, doesn't corrupt your file system. To speed up installations and massive deletions, I simply remount my partition as 'async'. For instance, I occasionally clean up my /usr/ports directory. Some of the ports generate a lot of object files. By using mount -uo async /usr the clean-up goes faster. Of course, the file system is less "safe", but the operation doesn't take as long. Rich ------------------------------------------------------------------------ Richard Neswold, Accelerator Div./Controls Dept | neswold@fnal.gov Fermilab, PO Box 500, MS 347, Batavia, IL 60510 | voice (630) 840-3454 'finger neswold@aduxb.fnal.gov' for PGP key | fax (630) 840-3093