FS#21969 - [kernel26] set fs.inotify.max_user_watches to 524288

Attached to Project: Arch Linux
Opened by Andrea Scarpino (BaSh) - Friday, 03 December 2010, 13:35 GMT
Last edited by Thomas Bächler (brain0) - Friday, 03 December 2010, 14:38 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Tobias Powalowski (tpowa)
Thomas Bächler (brain0)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
reading at [1], seems that KDE works better with an high value for fs.inotify.max_user_watches.
The KDE developer says that Ubuntu and SuSE have changed that value in their kernel configurations.
I know nothing about and I don't know what could change if we increment that value.
But more than an user asked me to increment that value in our installation.
So I'd like if we change that value in our configuration. Anyway, if you reject this we can ever add a line in the wiki that say how to increment Nepomuk performance)

[1] http://www.afiestas.org/nepomuk-is-not-fast-is-instant/

Additional info:
* kernel26 2.6.36-3
This task depends upon

Closed by  Thomas Bächler (brain0)
Friday, 03 December 2010, 14:38 GMT
Reason for closing:  Won't implement
Additional comments about closing:  Higher default may be unsafe, please add this to your local system configuration if desired.
Comment by Jan de Groot (JGC) - Friday, 03 December 2010, 14:14 GMT
The problem with this is that it allows random users to grab kernel memory. Setting that to 524288 means that a user can setup that amount of watches on a system, each taking 200 bytes of kernel memory. That would mean that each and every user on the system would be able to take 100MB of unswappable kernel memory. This isn't a problem if you're the only user on your 64bit desktop with lots of ram, but for users with less memory, or no desktop use at all, this creates a possibility to DoS a complete system from kernelspace.
Comment by Andrea Scarpino (BaSh) - Friday, 03 December 2010, 14:22 GMT
Thanks for your explanation Jan. It makes sense.
Now, I think that we should leave it as it is now and add some line to the Wiki.
Comment by Thomas Bächler (brain0) - Friday, 03 December 2010, 14:37 GMT
The linked article already states a solution: This can be changed in sysctl.conf, as a site-specific configuration. As Jan explained, the default should not be too high, but you can configure it as you wish on your systems:

echo “fs.inotify.max_user_watches = 524288″ >> /etc/sysctl.conf

You can add this to the KDE wiki so people know about it.

Loading...