Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filesystem watching? #770

Closed
joepie91 opened this issue Oct 1, 2014 · 5 comments
Closed

Filesystem watching? #770

joepie91 opened this issue Oct 1, 2014 · 5 comments
Labels
frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion

Comments

@joepie91
Copy link

joepie91 commented Oct 1, 2014

Currently, syncthing appears to use periodic polling to become aware of filesystem changes. This is not particularly efficient, and involves a significant trade-off between response time and overhead.

Perhaps you could include support for fanotify or inotify on systems where this functionality is available? I believe that fanotify supports recursive watches, which should keep the overhead to a minimum.

@alex2108
Copy link
Contributor

alex2108 commented Oct 1, 2014

duplicate of #9 which is closed because it's possible via external scripts that call /rest/scan (see other issue for links to implementations)

@joepie91
Copy link
Author

joepie91 commented Oct 1, 2014

Right. A few remarks on that:

  • This should probably at least be documented (in the README?).
  • Ideally, a script for this would be included in the syncthing distribution.
  • It seems that those notification scripts all use inotify rather than fanotify, which is a problem if you have a lot of nested directories. As a bonus, a Go API exists for fanotify.

@AudriusButkevicius
Copy link
Member

So the reason why this is not included is probably because syncthing runs on three different platforms, and the build process for all platforms is just two nested loops.

I agree fanotify would do a better job, and perhaps someone could integrate it to the current watcher, but it requires root privileges which some might be against.

@calmh
Copy link
Member

calmh commented Oct 1, 2014

https://github.com/Zillode/syncthing-inotify ought to be of interest

@jpjp
Copy link
Contributor

jpjp commented Oct 1, 2014

@joepie91 Come to https://github.com/Zillode/syncthing-inotify/ - patches accepted :)

Edit: too slow!

@calmh calmh added the wontfix label Oct 13, 2014
@calmh calmh closed this as completed Oct 13, 2014
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Jun 16, 2017
@syncthing syncthing locked and limited conversation to collaborators Jun 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion
Projects
None yet
Development

No branches or pull requests

6 participants