通过inotify工具和统一获得更好的性能. [英] Gaining better performance with inotify-tools and unison.
问题描述
我使用inotify-tools
和unison
在计算机之间同步文件夹.
因为我有一个很大的文件夹要同步,所以我只需编写一个inotifywait
脚本即可自动完成该工作.
让inotifywait
监视大文件夹的子目录以获得更好的性能是否明智?
I use inotify-tools
and unison
to synchronize folders between machines.
Because I have a large folder to synchronize, I just simply write an inotifywait
script to do the job automatically.
Is it sensible to let inotifywait
to monitor the subdirectories of the large folder to gain a better performance?
推荐答案
如果放弃inotify-tools
,并且仅使用unison的本机支持来监视文件夹中的更改,则应该会获得更好的性能.通过使用inotify-tools
,然后在发生更改时调用unison
,unison
必须先"重新查找"更改,然后才能进行同步.您可以改为将行repeat = watch
添加到您的统一配置文件中,并且unison
将连续运行并在发生任何更改时进行同步.它使用自己的文件观察器实用程序unison-fsmonitor
检测到更改,该实用程序直接与统一通信.
You should get better performance if you ditch inotify-tools
and just use unison's native support for watching your folders for changes. By using inotify-tools
and then calling unison
when a change occurs, unison
has to "re-find" the change before it syncs. You could instead add the line repeat = watch
to your unison profile and unison
will run continually and sync whenever there is a change. It detects the change with its own file-watcher utility unison-fsmonitor
that communicates directly with unison.
有关更多信息,请查看统一2.48.3的最新更改日志,其中对unison-fsmonitor
进行了重大更改.
For more information, check out the latest changelog for unison 2.48.3 with major changes to unison-fsmonitor
.
这篇关于通过inotify工具和统一获得更好的性能.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!