Skip to content

Commit 43cb09c

Browse files
authored
Merge pull request #595 from y-yagi/mention_memory_allocation_about_max_user_watches
Mention the relation with `fs.inotify.max_user_watches` and the memory allocation
2 parents 030aff8 + 4317b21 commit 43cb09c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,9 @@ $ sudo sysctl -p
353353
```
354354
You may also need to pay attention to the values of `max_queued_events` and `max_user_instances` if Listen keeps on complaining.
355355

356+
While 524,288 is the maximum number of files that can be watched. Each file watch [takes up 1,080 bytes](https://stackoverflow.com/a/7091897/1156119) on a 64-bit system, so assuming that all 524,288 watches are consumed, that allocates around 540 MiB.
357+
If you're in an environment that is particularly memory-constrained, consider to specify a lower number.
358+
356359
#### More info
357360
Man page for [inotify(7)](https://linux.die.net/man/7/inotify).
358361
Blog post: [limit of inotify](https://blog.sorah.jp/2012/01/24/inotify-limitation).

0 commit comments

Comments
 (0)