fio-plot icon indicating copy to clipboard operation
fio-plot copied to clipboard

Don't apply the implicit runtime always

Open nobuto-m opened this issue 1 year ago • 4 comments

When --size is supplied, it makes sense to complete the testing of the specified size rather than ending the test after the default runtime (60s). However, we should leave a space for a specific use case that an user specifies both --size and --runtime as per the fio manual.

runtime=time

The test will run until it completes the configured I/O workload or until it has run for this specified amount of time, whichever occurs first

Closes: #137

nobuto-m avatar Feb 05 '24 05:02 nobuto-m

Thanks for the clarification and pr! I understand and agree with your assessment. I have to find some time to evaluate this pr for myself

TjerkNan avatar Feb 05 '24 08:02 TjerkNan

Unfortunately, this fix doesn't seem to work for me.

This step: settings = {**defaultsettings, **customsettings} merges all variables, both default and custom. So when I run with parameter --size 10G but no runtime parameter, I still get the Estimated Duration of 1 minute.

So this code:

  if not settings["runtime"] and not settings["size"]:
          # if there is no explicit runtime nor size supplied, fallback to
          # the default runtime
          settings["runtime"] = defaultsettings["runtime"]

The settings["runtime"] is already the default so this won't work as I see it.

I fear that the best solution here is just to document that you should specify --runtime 0 if you specify the --size parameter with a device but don't want to use --entire-device.

I'm open to ideas!

louwrentius avatar Feb 10 '24 13:02 louwrentius

Hmm, I thought the patch worked for me. I might be wrong so let me retest it and get back to you.

nobuto-m avatar Feb 10 '24 15:02 nobuto-m

Hi all, @louwrentius @nobuto-m @TjerkNan

I do not think it is a good idea to change the code here. The conflict problems should be solved by user, why not make the paraini.py be able to identify a None value, like we did in function checks.check_settings:

if settings["entire_device"]:
        settings["runtime"] = None
        settings["size"] = "100%"

Then we can update the customsettings["runtime"] None to settings["runtime"].

jackeichen avatar May 21 '24 08:05 jackeichen