Programs that watch a huge amount of files slow down the whole system
Hagen Kühl
hagen at nornagest.de
Sun Nov 13 10:31:42 UTC 2016
Hello,
I've noticed this behaviour first with net/syncthing-inotify and now
with graphics/digikam. Both try to monitor files for changes and as
far as I understand the method used for this is fundamentally different
in Linux and FreeBSD. So in FreeBSD the program has to get a filehandle
for each file.
When the number of open files (sysctl kern.openfiles) gets very big the
system slows down. (It can take a minute to open a new temrinal for me)
Is there anything I can do (except avoiding these applications or
letting them manage less files) to avoid this?
Is there a way to monitor these files without keeping filehandles for
each? (So I could maybe create a patch) Or is there a way to prevent
the system from slowing down so much when managing a lot of filehandles?
Thanks in advance and best regards,
Hagen
More information about the freebsd-questions
mailing list