[resend to list] 2011/9/7 huang jun <hjwsm1989@xxxxxxxxx>: > hi,all > Recently,i read the source code of PG scrub.The ceph periodically > shed_scrub if the system load is not too high. And adminstrator can > manually scrub the specified OSD or PG using cmds. > but many questions come along with me when i got thourgh . > why did ceph need scrub? > what scrub used for? Scrubbing is intended to do a few things. First, any large storage system needs to periodically look at the data it's holding in order to make sure the data stays safe -- that the underlying hardware is still working (and the sectors are good), that cosmic rays haven't flipped bits, etc. Right now, Ceph's scrubbing is primitive: it only looks at the file sizes and a few other metadata attributes, and compares them to the ones it thinks the file should have and to what other storage nodes have. Eventually, it will be a great deal more involved than that, though! > because the OSD use three threads to handle the scrub transactions, > maybe it has a great effect on the stablity or performance of ceph? Well, background scrubbing (which the OSDs do automatically) is careful to only initiate scrubs when it won't impact users. If the administrator starts a scrub, it might. The number of threads involved isn't going to cause a problem, though -- they're used for synchronous IO and don't create a lot of CPU usage. -Greg -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html