Date: Tue, 10 Jul 2007 06:20:47 -0700 (PDT) From: Gore Jarold <gore_jarold@yahoo.com> To: bv@wjv.com Cc: freebsd-fs@freebsd.org Subject: Re: help needed - tuning a filesystem for rm and cp ? (MORE) Message-ID: <774173.69403.qm@web63007.mail.re1.yahoo.com> In-Reply-To: <20070710124050.GA2184@wjv.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--- Bill Vermillion <bv@wjv.com> wrote: > > All else being equal, how do you optimize a system > for > > copying from one place to another on the same > mount > > point ? How do you optimize a system for fast > file > > deletion ? Are the two mutually exclusive ? > > I've not done this recently as I've not had to, but > when > you need to move files from one place to another > >on the same > filesystem< you don't have to copy them. > > Use cpio with the -pdlm arguments. This will make > hard links > from the original file locations to the new file > location. > Then you can just 'rm' the original directory > entries and the > new directory will be running just as the old one. > > -p is passthrough, -d makes directories as needed, > -l make links > but you must use the -p option, and -v is verbose. > I always > run this way as I like to see just exactly what is > going on. > > The big upside of this is that you only build > directories and > it does NOT move the files themselves. Thus both > the build new > directory and remove the old directories are going > to be much > faster than copying files. > > It can be quite fast. Just checking the man pages > for > FreeBSD's cpio, I see the flags have greatly > expanded, as I used to > just use the -pdlm flags on System V.3 systems I was > running. > You may have to go thorugh manual carefuly to make > sure of > the flags. Yes - this is exactly what I do for the copies. I already do exactly as you describe. So perhaps there is no further system tuning or optimization that can be done for my copy processes ? What about my 'rm' processes - is there any way to optimize/tune a system to do very fast file deletions ? ____________________________________________________________________________________ Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out. http://answers.yahoo.com/dir/?link=list&sid=396545469
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?774173.69403.qm>