microsoft / StorScore

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

Allow recipe to specify IO_Generator_Args #24

Open lauracaulfield opened 8 years ago

lauracaulfield commented 8 years ago

Add another optional property to the test definition that lets the user specify additional arguments for the IO generator per-test. For example, the following test would run a 4k random read test with IOs aligned to 8k boundaries:

test( description => "4k Random Reads", write_percentage => 0, access_pattern => 'random', block_size => '4K', queue_depth => 1, warmup_time => 60, run_time => 3600, io_gen_args => '-r8k ', );

Currently, the only way to loop through multiple values for a generator's parameter is to build a script that calls storscore with different values for --io_generator_args. This makes it difficult to name each test and manage their results as a set.

marksantaniello commented 8 years ago

I think this is easily doable, but it breaks the abstraction around the IO generator -- it would lead to recipes that only work with DiskSpd and not SQLIO, for example. (Or perhaps more realistically, if someone ports StorScore to linux and adds fio support). Maybe that's fine.

lauracaulfield commented 8 years ago

It might help to have a flag to explicitly mention which IO_generator is needed for the recipe. Something like

... io_gen_args => "-r8k ", io_gen => diskspd ...

This way the code could fail, saying "IO generator inconsistency" instead of whatever the IO generator does with a different generator's args.

I'll have to think about how the IO-gen on the command line vs. in the recipe will work...

marksantaniello commented 8 years ago

You could just wrap the test in "if( $cmd_line->io_generator eq 'diskspd' )" and it would be silently ignored in the other cases. I think we once had some recipes that did this.

lauracaulfield commented 8 years ago

ah, I like it!