Misusing Bazaar for Data Backup
Robert Collins
robertc at robertcollins.net
Sun Aug 3 23:22:20 BST 2008
On Sun, 2008-08-03 at 18:40 +0200, Moritz Bartl wrote:
> Hallo Robert,
>
> Thank you for your quick reply. I was afraid to be told to give up on
> the approach. :-)
>
> > bzr shouldn't be statting all your files, only the individual ones; if
> > it is statting everything thats a bug. If it shows 'scanning..' that
> > simply because that phase of the commit still has to happen.
>
> It says "Collecting changes" for thousands of directories.
Yes, thats expected (there are thousands of directories in the tree).
This does *not reflect* disk IO [in the absence of defects]. If you
could run a system trace like sysinternals syscall monitor (I forget its
name) over this operation that would be very useful in determining if
there is a bug here.
? It doesn't take THAT long (a few seconds), but still long enough to
> wonder if it's really necessary. Even if I repeatedly run that command
> on the same file, it always "collects changes" first.
> Background: If I monitor every change in the file system and immediately
> commit them, I want the command to execute as fast as possible (ie.
> without scanning the directories).
Naturally. What 'Collecting changes' means really is 'generating new
inventory'. The inventory is a logical document with one line per
versioned object in your system. Doing a commit involves creating a copy
for the commit, then writing it disk. (as well as storing changed files
etc etc). When you have thousands of directories, you probably have tens
of thousands of files, and it will take a few seconds just to run
through all the objects and copy their state to the output inventory -
without hitting disk.
We have some open plans to change the way these logical documents are
managed so that we don't have to copy as much data during a selected
file commit - that will make it a subsecond operation if/when we achieve
this.
-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080804/59c8eff3/attachment.pgp
More information about the bazaar
mailing list