hertell / lsyncd

Automatically exported from code.google.com/p/lsyncd
GNU General Public License v2.0
0 stars 0 forks source link

Slow response to sync when any file changing in a large file system #63

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.in a statusFile, it contains "Inotify watching 7912 directories", a large no. 
of files to monitor
2.any changing of file or create a new file
3.it takes a few ten seconds to sync from source to dest.

What is the expected output? What do you see instead?
Should within one/two seconds to sync from source to dest. 

What version of the product are you using? On what operating system?
Ubuntu 10.04, and Lsyncd Version: 2.0.4

Please provide any additional information below.
It seems Lsyncd has a loop to monitor the whole file system, if the file system 
is large, it takes time to complete one loop.

Original issue reported on code.google.com by chungyan5@gmail.com on 26 May 2011 at 11:17

GoogleCodeExporter commented 9 years ago
Lsyncd has a built in delay by design. By default it is 15 seconds. This is to 
be able to aggregate several changes into one rsync call. You can change that 
with the delay parameter. E.g.:

sync{default.rsync, source="dir", target="dir", delay=3}

If you set it to 0 it will do at as instant as possible. But be also aware in 
that case it wont aggregate much changes and will call rsync excessively.

Original comment by axk...@gmail.com on 26 May 2011 at 11:26

GoogleCodeExporter commented 9 years ago
Thanks your hints. It helps me to narrow down my problem. 

I find some of my sub-folders can be sync., some cannot. It is due to my config 
file include the "excludeFrom", and i find the format must be:
XXX/XXX/
XXX/XXX/

which the end must be added "/", i have the above problem when "XXX/XXX"

Original comment by chungyan5@gmail.com on 27 May 2011 at 4:38

GoogleCodeExporter commented 9 years ago
I suppose this is done?

Original comment by axk...@gmail.com on 18 Aug 2011 at 9:29

GoogleCodeExporter commented 9 years ago
yes, solved, thanks

Original comment by chungyan5@gmail.com on 19 Aug 2011 at 2:02