I am working on a daemon that monitors file events via inotify to trigger various types of events when files are accessed. I have read that watches are a little expensive, because the Kernel is storing the full path name of every file being watched.
How many watches would be too many?
Edit: Mostly, I'm wondering .. have you ever seen a noticeable performance hit, if so, at how many watches did it happen? Yes, I have to monitor / recursively (however its a minimal bootstrapped system).
AFAIK the kernel isn't storing the pathname, but the inode. Nevertheless, there are 540 bytes per Watch on a 32bit system. Double as much on 64bit.
I know from Lsyncd (maybe you want to check that out?) people who have a million watches. It just eats a Gigabyte of memory.