mirror of
https://github.com/tkuschel/bees.git
synced 2025-11-18 15:29:14 +01:00
We detect toxic extents by measuring how long the LOGICAL_INO ioctl takes to run. If it is above some threshold, we consider the extent toxic, and blacklist it; otherwise, we process the extent normally. The detector was using the execution time of the ioctl, which detects toxic extents, but it also detects pauses of the bees process and transaction commit latency due to load. This leads to a significant number of false positives. The detection threshold was also very long, burning a lot of kernel CPU before the detection was triggered. Use the per-thread system CPU statistics to measure the kernel CPU usage of the LOGICAL_INO call directly. This is much more reliable because it is not confounded by other threads, and it's faster because we can set the time threshold two orders of magnitude lower. Also remove the lock and mutex added in "context: serialize LOGICAL_INO calls" because we theoretically no longer need it (but leave the code there with #if 0 in case we do need it in practice). Signed-off-by: Zygo Blaxell <bees@furryterror.org>
25 KiB
25 KiB