View source for inotify

===Linux inotify Limits===

The inotify(7) subsystem has three important tunings that impact watchman.

  * !!/proc/sys/fs/inotify/max_user_instances!! impacts how many different root dirs you can watch.
  * !!/proc/sys/fs/inotify/max_user_watches!! impacts how many dirs you can watch across all watched roots.
  * !!/proc/sys/fs/inotify/max_queued_events!! impacts how likely it is that your system will experience a notification overflow.

You obviously need to ensure that max_user_instances and max_user_watches are set so that the system is capable of keeping track of your files.

max_queued_events is important to size correctly; if it is too small, the kernel will drop events and watchman wonΆt be able to report on them. Making this value bigger reduces the risk of this happening.

Watchman has two simple strategies for mitigating an overflow of max_queued_events:

It uses a dedicated thread to consume kernel events as quickly as possible

((https://en.wikipedia.org/wiki/Inotify Inotify - Wikipedia))

((https://linux.die.net/man/7/inotify Inotify - Man Page))

((https://github.com/torvalds/linux/tree/master/fs/notify/inotify inotify - kernel))

((https://lwn.net/Articles/604686/ - inotify - lwn))
%%
inotifywait -mr -e close_write /storage/
%%