[Csync2] speed of "-cr /"

Aristedes Maniatis ari at ish.com.au
Thu Jun 10 01:48:11 CEST 2010


On 9/06/10 9:41 PM, Lars Ellenberg wrote:
> On Wed, Jun 09, 2010 at 08:12:52PM +1000, Aristedes Maniatis wrote:
>> On 8/06/10 12:02 AM, Lars Ellenberg wrote:
>>> csync2 -cr /
>>> does exactly that:
>>> it looks at its database, and stats all files listed in that database,
>>> as well as directories, and compares the recorded stat info with the
>>> "live" stat info.

Certainly as you say -vvvv gives lots of useful information about what is going on, which helps fills in the gaps in the documentation. It is clear that having a command line path of "/" causes every record to be fetched from the database:

   Trying to fetch a row from the database.

In my case, this is just under 100,000 of those log entries and that takes 99% of the time for the entire command to run. It looks like every record is fetched from the database, rather than just the records in the 'include' paths. Perhaps it is just too difficult to construct the SQL select command out of an arbitrary number of include/exclude statements.

But oddly, when I use "-R" csync2 presumably also fetches the entire db, but this time executes in a tiny fraction of the time (5 seconds, compared to over a minute for '-cr'). There are the same number of "Trying to fetch a row from the database." lines in the output.


Cheers

Ari


-- 
-------------------------->
Aristedes Maniatis
ish
http://www.ish.com.au
Level 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001   fax +61 2 9550 4001
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A


More information about the Csync2 mailing list