Linux inotify Limits


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


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

Inotify – Wikipedia[link1]

Inotify – Man Page[link2]

inotify – kernel[link3]

- inotify – lwn[link4]
inotifywait -mr -e close_write /storage/


Links
[link1] https://en.wikipedia.org/wiki/Inotify

[link2] https://linux.die.net/man/7/inotify

[link3] https://github.com/torvalds/linux/tree/master/fs/notify/inotify

[link4] https://lwn.net/Articles/604686/