[Csync2] speed of "-cr /"

Aristedes Maniatis ari at ish.com.au
Thu Jun 10 10:29:08 CEST 2010


On 10/06/10 6:02 PM, Lars Ellenberg wrote:
> For -R, its just config parsing, and SQL.
>
> For -c, it is one lstat for every record fetched.
> 100000 lstat calls may take some time;-)

In that case we've come a bit full circle with this conversation. Where we started:

* why does csync2 ignore the 'include' parameters when running -c?

If the performance issue is lstat, why is csync2 running lstat on files which don't match the include/exclude parameters for the configuration which it is running?

I haven't had a chance to dive into the code, but I assume that csync2 is doing something like this:

1. getting list of every file from SQL which matches the passed path (in my case, that is every file)
2. lstat for that file
3. comparing with the include/exclude parameters, discarding the result if we don't match
4. updating dirty status

Could items 2 and 3 be reversed? Or does item 3 never even happen at all?

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