Will "fs.inotify.max_user_watches" limit the quantity of files that can be indexed in total or in once?

It seems to me there is no need to adjust “max_user_watches” even if you have a larger number of files to be indexed than the “max_user_watches” number.

Previously when the “index the file content” option in manjaro system setting was enabled, the baloo only indexed 180000 of 900000 files. When I tried to “balooctl enable”, I got " reached the inotify folder watch limit" message.

However, it seems to me “max_user_watches=16384” is not the reason, because after I had “max_user_watches=524288”, “balooctl enable” wouldn’t start the indexing process either, although the " reached the inotify folder watch limit" message wouldn’t occur again.
When I checked the indexing process by “balooctl status”, it said the indexing process is not running.

After I disabled “index the file content” option, purged the index, baloo was able to index 900000 files with “fs.inotify.max_user_watches=524288”.
Then I set “fs.inotify.max_user_watches=16384”, then ran “balooctl enable” and " reached the inotify folder watch limit" wouldn’t occur either.

max_user_watches is indeed not related to Baloo not being able to index all files and 524288 eats up a lot of RAM.

The only thing max_user_watches does to Baloo is that it allows it to index more files simultaneously and I have the 16384 parameter set because it allows my PC to be turned into a Media server with minidlna

would have been possible with 16384 as well: it would just have been much slower…

Baloo is known for having hiccups and every now and then rebuilding the index is a necessity…

:upside_down_face:

1 Like

Your explanation makes a lot of sense.
why and when would Baloo ask the system so many simultaneous watcher to index the files?
Is it because some files with large amount of contents needs to be indexed simultaneously?
Thanks.

When you do this:

or:

  • when you copy a massive amount of files
  • restore a backup (even overwriting an existing file with the exact same file causes this)
  • Whatever other crazy things you’re doing to your poor old computer that I have no knowledge about and that creates a huge number of files… :joy: :wink:

:+1:

1 Like

I am not familiar with KDE packages, but this script to show how many watchers are used by system processes might be useful for you to see what baloo is doing
dotfiles/inotify-consumers at master · fatso83/dotfiles · GitHub

Increasing inotify max_user_watches to 524288 is usually needed for realtime scheduling when using JACK audio server
and software developers may need to increase the number of watched files

2 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.