Good Linux question — answering as the UphillTech team:
Is it safe to raise that value and what would be the consequences of a too high value? Yes, it's safe to raise that value and below are the possible costs [ source ]: Each used inotify watch takes up 540 bytes (32-bit system), or 1 kB (double - on 64-bit) [sources: 1 , 2 ] This comes out of kernel memory , which is unswappable. Assuming you set the max at 524288 and all were used (improbable), you'd be using approximately 256MB/512MB of 32-bit/64-bit kernel memory. Note that your application will also use additional memory to keep track of the inotify handles, file/directory paths, etc. --...
Full answer by tshepang: https://unix.stackexchange.com/a/13757 (CC BY-SA 3.0).
Need Linux help for your business? UphillTech.