What is a reasonable amount of inotify watches with Linux?

Tim Post :

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).

axkibe :

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.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

What is exactly difference between INotify max_user_instances and max_user_watches?

User limit of inotify watches reached on Ubuntu 16.04

What are watch descriptors really ? (Linux inotify subsystem)

sysctl: permission denied on key 'fs.inotify.max_user_watches'

Error "User limit of inotify watches reached". ExtReact build

How can I tell if I am out of inotify watches?

How to change value of /proc/sys/fs/inotify/max_user_watches

Spyder's Kite keeps inotify watches on all my home folder. Can I avoid it?

Is it reasonable to use Skype for Linux Beta?

What is a reasonable value for heartbeat in RabbitMQ?

What is a reasonable OSGi development workflow?

What is the simplest reasonable Kubernetes setup?

Linux: Conflicts using inotify with fcntl

What is the proper way to use inotify?

What is the minimum amount of RAM required to run Linux kernel on an Embedded device?

OpenTok - Subscriber failed to subscribe to a stream in a reasonable amount of time

How do you increase the amount of inotify watchers in Google Cloud Build?

What's a reasonable lifespan to expect of a java exception?

What is a reasonable code coverage % for unit tests (and why)?

Cassandra - What is the reasonable maximum number of tables?

What is the reasonable way to display matrix size?

What type is more reasonable to use for document numbers

Can I tell what properties an object has in Watches window?

correct use of linux inotify - reopen every time?

What is the short way for if-statement in inotify instance?

What is the minimum amount of memory required for starting a process on a Linux-based system?

How can I convert an absolutely massive number to a string in a reasonable amount of time?

Are watches asynchronous?

What maximal resolution is reasonable when using a VGA cable?