I don’t especially want to write an article, but I will say what I do, based on advice I have gleaned from the btrfs mail list, including one post by a btrfs developer specifically about recommended maintenance. I do all of this on a weekly basis.
- btrfs fi defragment -r (on each btrfs filesystem)
- btrfs balance start -v -dusage=85 (on each btrfs filesystem)
- btrfs scrub start (on each btrfs filesystem)
Notes: It was specifically cautioned not to use -musage in the balance, saying that can make things worse instead of better. The three steps should run sequentially, not concurrently. Many people will say not to defragment btrfs filesystems on SSDs; I do it, anyway. Finally, 85 should be the minimum -dusage; it was stated that doing it with smaller percentages does not help much.