Re: empty result in fio-1.16.9

From: Jens Axboe <jens.axboe_at_oracle.com>
Date: Thu, 26 Jul 2007 10:59:45 +0200

On Thu, Jul 26 2007, ljzhang,Yaxin Hu,Jianchao Tang wrote:
> 1. The job file looks like this:
> ---------runtime------------
> [global]
> directory=./temp
> nrfiles=1
> rw=randread
> size=32k
> thread
> [runtime]
> description="Too tiny a mission using less than 1sec."
> ----------------------------
>
> Most of the time,it seems like no io has been performed:
> ----------------------------
> nonggia_at_nonggia-desktop:~/fio$ fio runtime
> runtime: (g=0): rw=randread, bs=4K-4K/4K-4K, ioengine=sync, iodepth=1
> Starting 1 thread
>
> runtime: (groupid=0, jobs=1): err= 0: pid=7155
> Description : ["Too tiny a mission using less than 1sec."]
> cpu : usr=0.00%, sys=0.00%, ctx=1
> IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%,
> >=64=0.0%
> issued r/w: total=8/0, short=0/0
> lat (usec): 100=87.50%, 250=12.50%
>
>
> Run status group 0 (all jobs):
>
> Disk stats (read/write):
> sda: ios=8/0, merge=0/0, ticks=0/0, in_queue=0, util=0.00%
> nonggia_at_nonggia-desktop:~/fio$
> ----------------------------
>
> 2. Reason for the problem:
> It is so tiny a job that it may cost less than one second to finish.And
> the runtime is rounded down to 0.Just like the io never happened.
> We agree that the problem is really trifle, but for testing purpose, we
> think it maybe while the fixing.
>
> 3. Fix suggestion:
> We hope this can be useful:
> ----------------------------
> diff -Nraup fio-7.25/fio.c fio-7.25-runtime/fio.c
> --- fio-7.25/fio.c 2007-07-25 14:25:05.000000000 +0800
> +++ fio-7.25-runtime/fio.c 2007-07-26 09:59:09.000000000 +0800
> @@ -911,8 +911,8 @@ static void *thread_main(void *data)
> }
>
> update_rusage_stat(td);
> - td->ts.runtime[0] = runtime[0] / 1000;
> - td->ts.runtime[1] = runtime[1] / 1000;
> + td->ts.runtime[0] = (runtime[0] + 999) / 1000;
> + td->ts.runtime[1] = (runtime[1] + 999) / 1000;
> td->ts.total_run_time = mtime_since_now(&td->epoch);
> td->ts.io_bytes[0] = td->io_bytes[0];
> td->ts.io_bytes[1] = td->io_bytes[1];
> ----------------------------

> diff -Nraup fio-7.25/fio.c fio-7.25-runtime/fio.c
> --- fio-7.25/fio.c 2007-07-25 14:25:05.000000000 +0800
> +++ fio-7.25-runtime/fio.c 2007-07-26 09:59:09.000000000 +0800
> @@ -911,8 +911,8 @@ static void *thread_main(void *data)
> }
>
> update_rusage_stat(td);
> - td->ts.runtime[0] = runtime[0] / 1000;
> - td->ts.runtime[1] = runtime[1] / 1000;
> + td->ts.runtime[0] = (runtime[0] + 999) / 1000;
> + td->ts.runtime[1] = (runtime[1] + 999) / 1000;
> td->ts.total_run_time = mtime_since_now(&td->epoch);
> td->ts.io_bytes[0] = td->io_bytes[0];
> td->ts.io_bytes[1] = td->io_bytes[1];

Definitely correct, applied!

-- 
Jens Axboe
Received on Thu Jul 26 2007 - 10:59:45 CEST

This archive was generated by hypermail 2.2.0 : Thu Jul 26 2007 - 11:00:02 CEST