Increase the number of inotify watches

Bug #879902 reported by Mathieu Comandon
70
This bug affects 22 people
Affects Status Importance Assigned to Milestone
procps (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Many of the problems I encountered seem to be related to a single issue : the maximum number of watches inotify is able to handle.
I have found that the default maximum number of watches is way to low too handle every feature using inotify, a default Ubuntu uses a great number of watches out of the box and in Natty and Oneiric it starts to become a real problem.

Possible effects are :
- Ubuntu One not syncing correctly
- Nautilus not updating itself when a file is created or deleted.
- Audio players not updating music libraries
- tail -f or other programs using inotify show a cryptic message about no space being left on the device (while there's plenty of space)

I have found that simply doubling the maximum of watches *is not enough* for a normal use, and if I believe this comment : https://bugs.launchpad.net/ubuntu/+source/beagle/+bug/115801/comments/4 there is no problem to setting the number of watches to a high value. My current setting is 524288, which is 64 times the default value, It may be too high for a default value but I believe that 65536 or 131072 should be enough for almost everyone.

If Precise Pangolin wants to be predictable, this issues *has* to be addressed.

Tags: precise
tags: added: precise
Revision history for this message
Mathieu Comandon (strycore) wrote :

While searching the web for more information about this bug I found this :

https://launchpad.net/ubuntu/intrepid/+source/procps/+changelog
- 30-inotify-limits.conf: moved to "tracker" package for increasing inotify watches to 524,388 for tracker.

This means this problem has already been addressed but the fix was kept for tracker (it also show that my current max watches value is quite sane, even by 2008's standards)
Now, it seems that this file just when away (and nobody uses tracker anymore anyway) :

(15:38) strider@astoria:~ $ apt-file search inotify-limits.conf
(15:38) strider@astoria:~ $

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in procps (Ubuntu):
status: New → Confirmed
description: updated
Revision history for this message
Eshwar Andhavarapu (eshwar.andhavarapu) wrote :

Its a simple fix to change the number right, so something stopping someone from creating a patch and then presenting it here. I don't know which file to change or so on but the process must surely be simple unless the change is being debated?

Revision history for this message
Apteryx (maxco) wrote :

For those having this issue and wanting to increase the number of inotify watches themselves, here's the fix:
sudo -s
echo "fs.inotify.max_user_watches=524288" >> /etc/sysctl.conf
sysctl -p

Revision history for this message
Stu (stu-axon) wrote :

I have

fs.inotify.max_user_watches=1048576

and experiencing what looks like this issue (downloading a file and size not updating in nautilus). I'm using insync and spideroak, so maybe these are using up the watches ?

Revision history for this message
Vadim Kotov (kotov) wrote :

I am still affected by this in 2018. Any plans to increase the number? It is 8192 in Ubuntu 18.04.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.