Other What exactly is bufdaemon?


I've looked around to see what bufdaemon is responsible for, but no luck just yet.

Some background: we support several servers providing IPTV service with time-shifting, meaning constant writing on the storage device and scheduled clean-up of stale data. Servers have lots of RAM (usually 64-96GB), but depending on what end-users watch, upon cache miss there is frequent reading, as well (media streaming for each active session). Simplified, cleaning-up of stale data is using something like
find /path/to/media/files -type f -a -name '*.ts' ! -newer /sample/file/with/specific/date -delete scheduled to run each 10 minutes via cron().

However sometimes (I have no accurate observations at this time) during or after this find/delete phase bufdaemon misbehaves: it will either start reading lots of data (visible in top() in I/O mode, as well as gstat()) starving, suffocating and breaking media writers or will start eating lots of CPU and during that time I/O-bound processes use lots of system time (top() displays one of bufdaemon's threads using 100% CPU time for awhile, as well as large CPU usage surge for I/O-bound processes). File system is UFS created with newfs -jU ..., running up-to-date FreeBSD 10.3, BTW.

Any pointers, anyone?