* [PATCH v2 0/1] fio: reset more counters when ramp time has elapsed
@ 2018-10-18 20:42 vincentfu
2018-10-18 20:42 ` [PATCH v2 1/1] " vincentfu
2018-10-18 21:32 ` [PATCH v2 0/1] " Jens Axboe
0 siblings, 2 replies; 4+ messages in thread
From: vincentfu @ 2018-10-18 20:42 UTC (permalink / raw)
To: axboe, fio, vincentfu; +Cc: Vincent Fu
From: Vincent Fu <vincent.fu@wdc.com>
Jens, I sent the wrong patch earlier.
This version should be safer since reset_io_stats() is now called in
ramp_time_over() instead of in reset_all_stats().
Vincent Fu (1):
fio: reset more counters when ramp time has elapsed
time.c | 1 +
1 file changed, 1 insertion(+)
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/1] fio: reset more counters when ramp time has elapsed
2018-10-18 20:42 [PATCH v2 0/1] fio: reset more counters when ramp time has elapsed vincentfu
@ 2018-10-18 20:42 ` vincentfu
2018-10-18 21:22 ` Sébastien Boisvert
2018-10-18 21:32 ` [PATCH v2 0/1] " Jens Axboe
1 sibling, 1 reply; 4+ messages in thread
From: vincentfu @ 2018-10-18 20:42 UTC (permalink / raw)
To: axboe, fio, vincentfu; +Cc: Vincent Fu
From: Vincent Fu <vincent.fu@wdc.com>
Currently,
fio --name=test --ramp_time=2 --time_based=1 --runtime=2s --size=1M
will produce an output line like
IO depths : 1=184.7%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
184.7% appears because the denominator used in the IO depth calculation
is reset at the conclusion of ramp_time but the numerator is not.
Latency and other IO depth statistics also include data from IOs
completed during ramp time. This patch resets these counters when ramp
time is over.
---
time.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/time.c b/time.c
index c8876829..19999699 100644
--- a/time.c
+++ b/time.c
@@ -118,6 +118,7 @@ bool ramp_time_over(struct thread_data *td)
if (utime_since_now(&td->epoch) >= td->o.ramp_time) {
td->ramp_time_over = true;
reset_all_stats(td);
+ reset_io_stats(td);
td_set_runstate(td, TD_RAMP);
/*
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/1] fio: reset more counters when ramp time has elapsed
2018-10-18 20:42 ` [PATCH v2 1/1] " vincentfu
@ 2018-10-18 21:22 ` Sébastien Boisvert
0 siblings, 0 replies; 4+ messages in thread
From: Sébastien Boisvert @ 2018-10-18 21:22 UTC (permalink / raw)
To: vincentfu, axboe, fio; +Cc: Vincent Fu
On 2018-10-18 4:42 p.m., vincentfu@gmail.com wrote:
> From: Vincent Fu <vincent.fu@wdc.com>
>
> Currently,
>
> fio --name=test --ramp_time=2 --time_based=1 --runtime=2s --size=1M
>
> will produce an output line like
>
> IO depths : 1=184.7%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
I reproduced this with fio d5dbacf662b1cc3fb09b5cd70b236ab98d1c0dbe :
[sboisvert@GT480:fio]$ ./fio --name=test --ramp_time=2 --time_based=1 --runtime=2s --size=1M | grep "IO depths"
IO depths : 1=184.1%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
>
> 184.7% appears because the denominator used in the IO depth calculation
> is reset at the conclusion of ramp_time but the numerator is not.
> Latency and other IO depth statistics also include data from IOs
> completed during ramp time. This patch resets these counters when ramp
> time is over.
> ---
> time.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/time.c b/time.c
> index c8876829..19999699 100644
> --- a/time.c
> +++ b/time.c
> @@ -118,6 +118,7 @@ bool ramp_time_over(struct thread_data *td)
> if (utime_since_now(&td->epoch) >= td->o.ramp_time) {
> td->ramp_time_over = true;
> reset_all_stats(td);
> + reset_io_stats(td);
> td_set_runstate(td, TD_RAMP);
>
> /*
>
With d5dbacf662b1cc3fb09b5cd70b236ab98d1c0dbe + this patch :
[sboisvert@GT480:fio]$ ./fio --name=test --ramp_time=2 --time_based=1 --runtime=2s --size=1M | grep "IO depths"
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
Tested-by: Sebastien Boisvert <sboisvert@gydle.com>
Thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 0/1] fio: reset more counters when ramp time has elapsed
2018-10-18 20:42 [PATCH v2 0/1] fio: reset more counters when ramp time has elapsed vincentfu
2018-10-18 20:42 ` [PATCH v2 1/1] " vincentfu
@ 2018-10-18 21:32 ` Jens Axboe
1 sibling, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2018-10-18 21:32 UTC (permalink / raw)
To: vincentfu, fio; +Cc: Vincent Fu
On 10/18/18 2:42 PM, vincentfu@gmail.com wrote:
> From: Vincent Fu <vincent.fu@wdc.com>
>
> Jens, I sent the wrong patch earlier.
>
> This version should be safer since reset_io_stats() is now called in
> ramp_time_over() instead of in reset_all_stats().
Agree, that makes me less nervous. Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-10-18 21:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-18 20:42 [PATCH v2 0/1] fio: reset more counters when ramp time has elapsed vincentfu
2018-10-18 20:42 ` [PATCH v2 1/1] " vincentfu
2018-10-18 21:22 ` Sébastien Boisvert
2018-10-18 21:32 ` [PATCH v2 0/1] " Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox