Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

startdelay not working #1164

Open
thaotran9 opened this issue Jan 12, 2021 · 5 comments
Open

startdelay not working #1164

thaotran9 opened this issue Jan 12, 2021 · 5 comments
Labels
enhancement patcheswelcome No one internal is working on this but an external contributor's help is very welcome!

Comments

@thaotran9
Copy link

thaotran9 commented Jan 12, 2021

I have noticed that a job did not delay the starting time when using startdelay option. I wonder if I missed anything or this is a bug.

Here is my fio file:

[global]
filename=C:\test_file
cpus_allowed=0-2
cpumask=7
direct=1
time_based=1
runtime=30
thread=1

[test]
stonewall
rw=randrw
blockalign=512B
rwmixread=80
rwmixwrite=20
percentage_random=50
bssplit=4k/15:8k/20:16k/20:32k/15:64k/15:128k/10:256k/5

[test]
stonewall
startdelay=30
rw=randrw
blockalign=512B
rwmixread=80
rwmixwrite=20
percentage_random=50
bssplit=4k/15:8k/20:16k/20:32k/15:64k/15:128k/10:256k/5

@sitsofe
Copy link
Collaborator

sitsofe commented Jan 12, 2021

@thaotran9 Hello!

We can only look into an issue when we have all the information requested in https://github.com/axboe/fio/blob/master/.github/SUPPORT.md#reporting-bugs / https://github.com/axboe/fio/blob/master/REPORTING-BUGS#L12 . Could you edit all this information into your comment above? Thank you!

@sitsofe sitsofe added the needreporterinfo Waiting on information from the issue reporter label Jan 12, 2021
@thaotran9
Copy link
Author

Issue: I observed that startdelay option did not delay the starting time of a job.

FIO version: 3.25 on Windows 10

Reproduction steps and minimal job file/command line parameters:
- job file is as above, jobs run sequentially with stonewall option, named as test.fio
- run fio.exe test.fio
- expect to see the workload finish in 90 seconds as the first job run for 30s, delay the second job for 30s and then the second job runs for another 30s. but noticed that the workload finished in just 60s so I think there is issue with startdelay or I might have missed something in the job file that I don't know. Please help.

@thaotran9
Copy link
Author

I see my issue, startdelay delays the starting time of a job from the beginning not from the previous job. Does it make more sense to delay from previous job though?

@sitsofe
Copy link
Collaborator

sitsofe commented Jan 13, 2021

@thaotran9:

startdelay delays the starting time of a job from the beginning

Yes, it looks like that's the case. See the following:

Does it make more sense to delay from previous job though?

While I don't think it makes sense to redefine the existing option it could be done as a new parameter (per_job_start_delay?) that starts its timer from after all stonewall/waits have expired. You would have to store a per thread "start" time somewhere... One idea would be to create an array for each job. You would then check if per_job_start_delay is on for this particular job and if so then when we get to https://github.com/axboe/fio/blob/fio-3.25/backend.c#L2331 we can store a "start" time into the array and check if the delay time has expired if it was previously set on future iterations.

Whichever approach is taken, this is a new feature request so I'll label it up as such. Please be aware that most new feature requests are only completed through the work of new contributors (the fio developers are busy with non-fio work). Would you like to take an attempt to code this up so we can review it?

@sitsofe sitsofe added enhancement patcheswelcome No one internal is working on this but an external contributor's help is very welcome! and removed needreporterinfo Waiting on information from the issue reporter labels Jan 13, 2021
@thaotran9
Copy link
Author

What you described is great for the new parameter. There is a workaround when previous job's runtime is specified, we can keep track of how many seconds the workload has passed but when io_size is used instead of runtime, we don't have a way to know in advance which value to use for startdelay.

ahribeng pushed a commit to ahribeng/fio that referenced this issue Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement patcheswelcome No one internal is working on this but an external contributor's help is very welcome!
Projects
None yet
Development

No branches or pull requests

2 participants