guard / listen

The Listen gem listens to file modifications and notifies you about the changes.
https://rubygems.org/gems/listen
MIT License
1.92k stars 246 forks source link

Readme tells users to provide a way too high value for `fs.inotify.max_user_watches` #568

Open dhs-rec opened 1 year ago

dhs-rec commented 1 year ago

The readme instructs people to increase the user watches to 524288 which is 64 times higher than the default value, which is set to 8192 for a reason.

Each watch consumes 1080 bytes of kernel memory on a 64-bit system. Setting the limit to such a high number would allow EACH USER on the system to potentially allocate number of watches * 1080 bytes of memory.

With the proposed value, this sums up to 540MB each user on the system could allocate, just for filesystem watches.

It would be better to tell people to increase the value in small steps until things start to work.