Flexible I/O Tester development
 help / color / mirror / Atom feed
* How to loop a timebased job
@ 2013-09-03 19:34 Erwan Velu
  2013-09-03 22:37 ` Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: Erwan Velu @ 2013-09-03 19:34 UTC (permalink / raw)
  To: fio@vger.kernel.org

Hey,

I'm on the IRC channel trying to help someone that needs to do the 
following :

doing IOs for x seconds
sleeping for y seconds
and looping this z times

While trying to setup this, I faced that loops and timebased seems 
exclusive options.
Am I wrong on this point ?

If not, would it be possible not to let them exclusive or add a new 
option to handle this case?

Cheers,
Erwan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to loop a timebased job
  2013-09-03 19:34 How to loop a timebased job Erwan Velu
@ 2013-09-03 22:37 ` Jens Axboe
  2013-09-04 13:56   ` Erwan Velu
  0 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2013-09-03 22:37 UTC (permalink / raw)
  To: Erwan Velu; +Cc: fio@vger.kernel.org

On Tue, Sep 03 2013, Erwan Velu wrote:
> Hey,
> 
> I'm on the IRC channel trying to help someone that needs to do the following
> :
> 
> doing IOs for x seconds
> sleeping for y seconds
> and looping this z times
> 
> While trying to setup this, I faced that loops and timebased seems exclusive
> options.
> Am I wrong on this point ?
> 
> If not, would it be possible not to let them exclusive or add a new option
> to handle this case?

It should work, if it doesn't, I agree it's a bug. It's not certain than
anyone has considered this specific use case before.

Feel free to fix! Or I can take a look at it tomorrow.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to loop a timebased job
  2013-09-03 22:37 ` Jens Axboe
@ 2013-09-04 13:56   ` Erwan Velu
  2013-09-04 17:52     ` Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: Erwan Velu @ 2013-09-04 13:56 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio@vger.kernel.org

On 04/09/2013 00:37, Jens Axboe wrote:
> It should work, if it doesn't, I agree it's a bug. It's not certain 
> than anyone has considered this specific use case before. Feel free to 
> fix! Or I can take a look at it tomorrow. 
I think I found the issue but my main question is about priority.

If both time & loops are set, what shall be considered as the key 
element to stop the benchmark.

Today, time have the priority over loops as keep_running() returns if 
time_based while time is handled in do_io().

If I do remove this test in keep_running, the first of the two getting 
the limit will stop the job.
On one hand, we have timebased option to insure time over end of device.
Shall we put a loopbased on the other hand ?

My 2 cents,
Erwan



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to loop a timebased job
  2013-09-04 13:56   ` Erwan Velu
@ 2013-09-04 17:52     ` Jens Axboe
  2013-09-04 20:02       ` Erwan Velu
  0 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2013-09-04 17:52 UTC (permalink / raw)
  To: Erwan Velu; +Cc: fio@vger.kernel.org

On 09/04/2013 07:56 AM, Erwan Velu wrote:
> On 04/09/2013 00:37, Jens Axboe wrote:
>> It should work, if it doesn't, I agree it's a bug. It's not certain
>> than anyone has considered this specific use case before. Feel free to
>> fix! Or I can take a look at it tomorrow. 
> I think I found the issue but my main question is about priority.
> 
> If both time & loops are set, what shall be considered as the key
> element to stop the benchmark.
> 
> Today, time have the priority over loops as keep_running() returns if
> time_based while time is handled in do_io().
> 
> If I do remove this test in keep_running, the first of the two getting
> the limit will stop the job.
> On one hand, we have timebased option to insure time over end of device.
> Shall we put a loopbased on the other hand ?

Good point, yes, that is a problem. Adding a loopbased option would seem
to be the best way to solve the dependency issue.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to loop a timebased job
  2013-09-04 17:52     ` Jens Axboe
@ 2013-09-04 20:02       ` Erwan Velu
  2013-09-04 20:11         ` Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: Erwan Velu @ 2013-09-04 20:02 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio@vger.kernel.org

On 04/09/2013 19:52, Jens Axboe wrote:
> Good point, yes, that is a problem. Adding a loopbased option would 
> seem to be the best way to solve the dependency issue. 
Ok, I'm working on this option.

Here come the kind of usage I'm thinking about :

[general]
....
loop_based
loops=5

[job_1]
....
runtime=10

[job_2]
....
runtime=20


That lever the question on where we shall "loop" the jobs ?
What's the preferred option regarding your experience on fio ?
The main problem I'm facing is to reinit properly jobs between loops 
(like td->terminate or doing the start_delay,...)

Shall it be better to manage it inside thread_main() or get it outside ?

Thanks for your insights,
Erwan


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to loop a timebased job
  2013-09-04 20:02       ` Erwan Velu
@ 2013-09-04 20:11         ` Jens Axboe
  0 siblings, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2013-09-04 20:11 UTC (permalink / raw)
  To: Erwan Velu; +Cc: fio@vger.kernel.org

On 09/04/2013 02:02 PM, Erwan Velu wrote:
> On 04/09/2013 19:52, Jens Axboe wrote:
>> Good point, yes, that is a problem. Adding a loopbased option would
>> seem to be the best way to solve the dependency issue. 
> Ok, I'm working on this option.
> 
> Here come the kind of usage I'm thinking about :
> 
> [general]
> ....
> loop_based
> loops=5
> 
> [job_1]
> ....
> runtime=10
> 
> [job_2]
> ....
> runtime=20
> 
> 
> That lever the question on where we shall "loop" the jobs ?
> What's the preferred option regarding your experience on fio ?
> The main problem I'm facing is to reinit properly jobs between loops
> (like td->terminate or doing the start_delay,...)
> 
> Shall it be better to manage it inside thread_main() or get it outside ?

I think you want to do it inside thread_main(), similarly to how it's
done for just plain loops or timed based running. The clearing of state
between runs should take care of it.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-09-04 20:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-03 19:34 How to loop a timebased job Erwan Velu
2013-09-03 22:37 ` Jens Axboe
2013-09-04 13:56   ` Erwan Velu
2013-09-04 17:52     ` Jens Axboe
2013-09-04 20:02       ` Erwan Velu
2013-09-04 20:11         ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox