On Sun, 05 Jan 2014 08:42:46 -0500 Jim Salter <jim@xxxxxxxxx> wrote: > On Jan 5, 2014 1:39 AM, Marc MERLIN <marc@xxxxxxxxxxx> wrote: > > > > On Fri, Jan 03, 2014 at 09:34:10PM +0000, Duncan wrote: > > Yes, I got that. That why I ran btrfs defrag on the files after that > > Why are you trying to defrag an SSD? There's no seek penalty for > moving between fragmented blocks, so defrag isn't really desirable in > the first place. [I normally try to reply directly to list but don't believe I've seen this there yet, but got it direct-mailed so will reply-all in response.] There's no seek penalty so the overall problem is dramatically lessened as that's the significant part of it on spinning rust, correct, but... SSDs do remain IOPS-bound, and tens or hundreds of thousands of extents do exact an IOPS (as well as general extent bookkeeping) toll, too. That's why I ended up enabling autodefrag here when I was first setting up, even tho I'm on SSD. (Only after asking the list basically the same question, what good it is autodefrag on SSD, tho.) Luckily I don't happen to deal with any of the internal-write-in-huge-files scenarios, however, and I enabled autodefrag to cover the internal-write-in-small-file scenarios BEFORE I started putting any data on the filesystems at all, so I'm basically covered, here, without actually having to do chattr +C on anything. > That doesn't change the fact that the described lockup sounds like a > bug not a feature of course, but I think the answer to your personal > issue on that particular machine is "don't defrag a solid state > drive". I now believe the lockup must be due to processing the hundreds of thousands of extents on all those snapshots, too, in addition to doing it on the main volume. I don't actually make very extensive use of snapshots here anyway, so I didn't think about that aspect originally, but that's gotta be what's throwing the real spanner in the works, turning a possibly long but workable normal defrag (O(1)) into a lockup scenario (O(n)) where virtually no progress is made as currently coded. -- Duncan - No HTML messages please, as they are filtered as spam. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
