microsoft / StorScore

A test framework to evaluate SSDs and HDDs
http://aka.ms/storscore
MIT License
81 stars 34 forks source link

StorScore drive prep & preconditioning #44

Open jetOak opened 7 years ago

jetOak commented 7 years ago

This is more of a request for information than an issue. I was wondering if someone could breakdown how StorScore preps and preconditions a drive before a test is run. Just looking at the output I can see that the drive is purged, initialized, and then preconditions. What do each of these steps consist of?

Thank you

marksantaniello commented 7 years ago

You can add --verbose and --pretend to the command line to see for yourself. In this mode we should print all the commands we would have run, but not actually run them.

jetOak commented 7 years ago

Thanks for the information. You wouldn't happen to have a description of what these flags mean?

precondition.exe -Y -b4 -o128 -w0 -ss -p

jetOak commented 7 years ago

Ok, got these:

-b4: Block size kB -o128: Queue Depth -w0: Write percentage

Still not sure about -Y, -ss, or -p.

marksantaniello commented 7 years ago

The best I can offer is the usage info from the tool itself. The code is here: https://github.com/Microsoft/StorScore/blob/master/src/precondition/precondition.cpp#L79-L98

jetOak commented 7 years ago

Again, thanks for the information. So just to make sure I am understanding this correctly:

precondition.exe -Y -b4 -o128 -w0 -ss -p

This command is issuing a 4K queue depth 128 read precondition that is running until steady state performance is detected.

What does the purge and initialize stages consist of?

marksantaniello commented 7 years ago

You should be able to see those commands under --verbose --pretend, too, I think. IIRC, we do a diskpart /clean to purge, and the initialize step is also an invocation of precondition.exe, but rather than driving to steady-state we just ask the preconditioner to overwrite the drive 2x.

jetOak commented 7 years ago

Looking at the initialization phase (Of the 4K read recipe) I am seeing this:

precondition.exe -n22 -p

Based on the description in the preconditionrunner.pm "-n22" would suggest 22 passes. Is that accurate? What does precondition.exe do when you don't actually give it any flags

marksantaniello commented 7 years ago

Going mostly by memory here again, but yeah I think -n and -ss are alternatives. You can either run until the dynamic steady-state detector is happy, or you can run for a fixed number of passes over the target.

And yeah, I think your case is 22 passes over the file. The idea is that we want to figure out out much capacity the device has, and write 2x that amount, to escape the "fresh out of the box" condition (due to overprovisioning). In case the file is smaller than the device, we will write it more than 2x. Hope that makes sense. The code is here: https://github.com/Microsoft/StorScore/blob/master/lib/Target.pm#L426-L464