Continuing from above:
You can however fine tune other systemd parameters. This gets rather complex if you're not familiar with systemd services. I'm plenty familiar with it, and I've never attempted tuning anything in this manner. Definitely not light reading:
Understanding systemd scheduling-related options
https://wiki.archlinux.org/title/systemd
Here are some other ideas I located that I hadn't seen before:
I did find one fairly recent thread claiming that removing the autodefrag
mount option from btrfs partitions in/etc/fstab
fixed a similar issue. That's unfortunately not a very good long term solution (but I guess it's worth a try).
See:
autodefrag mount option causes high cpu load
I also found another thread claiming that modifying snapper's config file could help.
See:
Yet another btrfs-cleaner freezing issue
I'll let you know if I come across anything further.
Edit:
Oh ya, I can't believe this wasn't covered already. Be sure to test some alternate kernels such as, linux-lts
, and linux-mainline
, and perhaps a real time (rt) kernel may help.