[Nottingham] Depth first or breadth first for faster backups?

Martin Garton martin at stupids.org
Wed May 2 13:36:04 BST 2007


On Wed, 2007-05-02 at 13:26 +0100, Martin wrote:

> For traversing through directories and files, what should be the faster:
> 
> Walking through the directories and files going depth first or breadth
> first?

Are you talking about reading all the data in each file as you go along?

I would recommend having a look what the various utilities do.  cp or
tar for example.  I wouldn't be surprised if the fastest approach varies
by filesystem type as well as about a million other factors.

> I would guess that just doing a simple "dd" would be quickest and
> minimise HDD head movements... But then that's only useful if you're
> near 100% utilisation and you're going to mount the dd copy as an image!

Yes. Also dd will not benefit from caching (other than the cache on your
physical device) since it works at the block layer not the fs layer.

> On a related theme:
> 
> What utilities do people use for their backups?

tar and rsync.

-- 
Martin.





More information about the Nottingham mailing list