All of lore.kernel.org
 help / color / mirror / Atom feed
* generating latency logs
@ 2012-08-07  1:03 Mike Ryan
  2012-08-07 13:43 ` Jens Axboe
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Ryan @ 2012-08-07  1:03 UTC (permalink / raw)
  To: fio

I'm trying to generate a latency log, but no log file is ever created.
I'm using the version tagged as fio-2.0.8 in git. This is how I'm
invoking fio:

  fio --latency-log=/tmp/log --output=/tmp/log random_write.fio

Here is the file random_write.fio:

  [random-writers]
  ioengine=libaio
  iodepth=4
  rw=randwrite
  bs=4k
  direct=0
  size=64m

I tried to debug it a little myself by adding some print statements. In
particular, at init.c:840 [1]:

        if (td->o.write_lat_log) {
                puts("latency logging");
                setup_log(&td->lat_log, td->o.log_avg_msec);
                setup_log(&td->slat_log, td->o.log_avg_msec);
                setup_log(&td->clat_log, td->o.log_avg_msec);
        }
        else {
                puts("not logging");
        }

[1] http://git.kernel.dk/?p=fio.git;f=init.c;hb=cf9a74#l840

When I run the command as above, I see the text "not logging". This
seems odd.

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

* Re: generating latency logs
  2012-08-07  1:03 generating latency logs Mike Ryan
@ 2012-08-07 13:43 ` Jens Axboe
  2012-08-07 14:47   ` Mike Ryan
  0 siblings, 1 reply; 5+ messages in thread
From: Jens Axboe @ 2012-08-07 13:43 UTC (permalink / raw)
  To: Mike Ryan; +Cc: fio

On 08/07/2012 03:03 AM, Mike Ryan wrote:
> I'm trying to generate a latency log, but no log file is ever created.
> I'm using the version tagged as fio-2.0.8 in git. This is how I'm
> invoking fio:
> 
>   fio --latency-log=/tmp/log --output=/tmp/log random_write.fio

The latency/bw logs are named from the job name, so you can't actually
give it a specific name with the (global) command line option. You'd
need to use the job option to do that.

That said, it does look broken in that we don't inherit the global
setting. Does the below make it work?

diff --git a/init.c b/init.c
index 3865d09..6aad492 100644
--- a/init.c
+++ b/init.c
@@ -1169,6 +1169,8 @@ static int fill_def_thread(void)
 
 	fio_getaffinity(getpid(), &def_thread.o.cpumask);
 	def_thread.o.timeout = def_timeout;
+	def_thread.o.write_lat_log = write_lat_log;
+	def_thread.o.write_bw_log = write_bw_log;
 
 	/*
 	 * fill default options

-- 
Jens Axboe


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

* Re: generating latency logs
  2012-08-07 13:43 ` Jens Axboe
@ 2012-08-07 14:47   ` Mike Ryan
  2012-08-08  5:23     ` Kyle Hailey
  2012-08-08  5:26     ` Kyle Hailey
  0 siblings, 2 replies; 5+ messages in thread
From: Mike Ryan @ 2012-08-07 14:47 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio

On Tue, Aug 07, 2012 at 03:43:06PM +0200, Jens Axboe wrote:
> >   fio --latency-log=/tmp/log --output=/tmp/log random_write.fio
> 
> The latency/bw logs are named from the job name, so you can't actually
> give it a specific name with the (global) command line option. You'd
> need to use the job option to do that.

The argument requires an option. It appears that option is discarded.

> That said, it does look broken in that we don't inherit the global
> setting. Does the below make it work?

Yes! The files are named log_lat.log, log_slat.log, and log_clat.log.
They are not named after the job.


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

* Re: generating latency logs
  2012-08-07 14:47   ` Mike Ryan
@ 2012-08-08  5:23     ` Kyle Hailey
  2012-08-08  5:26     ` Kyle Hailey
  1 sibling, 0 replies; 5+ messages in thread
From: Kyle Hailey @ 2012-08-08  5:23 UTC (permalink / raw)
  To: Mike Ryan; +Cc: Jens Axboe, fio


[-- Attachment #1.1: Type: text/plain, Size: 2476 bytes --]

very cool, so if I add the changes to init.c and run


fio --latency-log --output  test.job


I get extra four  files

 -rw-r--r--  1 me staff   14937 Aug  8  2012 fiotest_lat.log
-rw-r--r--  1 me staff       0 Aug  8  2012 fiotest_slat.log
-rw-r--r--  1 me staff   14932 Aug  8  2012 fiotest_clat.log
-rw-r--r--  1 me staff 4194304 Aug  8  2012 fiotest.1.0


What's the format?

$ more fiotest_lat*
1, 19, 1, 4096
1, 18, 1, 4096
1, 8, 1, 4096
1, 7, 1, 4096
1, 7, 1, 4096

What's the format? OK, found http://www.spinics.net/lists/fio/msg01064.html

Format of entries is:

   time, rate/latency, data direction, block size

 Time: in milliseconds. Bandwidth logs are usually 500 or 1000ms apart; that
 can be controlled by the config file with "bwavgtime=[x ms]".

 Rate/latency: for bandwidth, this is in KB/sec. For latency, it's
 microseconds.

 Data direction: 0 is read, 1 is write.

 Block size: block size of IOs in bytes.



the clat and lat look pretty much the same except clat is faster than lat
(clat is completion time ie  submission time plus I/O completion time - was
never that clear on this)


$ paste fiotest_lat* fiotest_c* | more
1, 19, 1, 4096  1, 17, 1, 4096
1, 18, 1, 4096  1, 17, 1, 4096
1, 8, 1, 4096   1, 7, 1, 4096
1, 7, 1, 4096   1, 6, 1, 4096
1, 7, 1, 4096   1, 6, 1, 4096

what is the format of the file fiotest.1.0 ?
Is there a way to get the latency files without this file to avoid too much
output.


Thanks

- Kyle


On Tue, Aug 7, 2012 at 7:47 AM, Mike Ryan <mike.ryan@inktank.com> wrote:

> On Tue, Aug 07, 2012 at 03:43:06PM +0200, Jens Axboe wrote:
> > >   fio --latency-log=/tmp/log --output=/tmp/log random_write.fio
> >
> > The latency/bw logs are named from the job name, so you can't actually
> > give it a specific name with the (global) command line option. You'd
> > need to use the job option to do that.
>
> The argument requires an option. It appears that option is discarded.
>
> > That said, it does look broken in that we don't inherit the global
> > setting. Does the below make it work?
>
> Yes! The files are named log_lat.log, log_slat.log, and log_clat.log.
> They are not named after the job.
> --
> To unsubscribe from this list: send the line "unsubscribe fio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



-- 
- Kyle

O: +1.415.341.3430
F: +1.650.494.1676
275 Middlefield Road, Suite 50
Menlo Park, CA 94025
http://www.delphix.com

[-- Attachment #1.2: Type: text/html, Size: 6108 bytes --]

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 821 bytes --]

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

* Re: generating latency logs
  2012-08-07 14:47   ` Mike Ryan
  2012-08-08  5:23     ` Kyle Hailey
@ 2012-08-08  5:26     ` Kyle Hailey
  1 sibling, 0 replies; 5+ messages in thread
From: Kyle Hailey @ 2012-08-08  5:26 UTC (permalink / raw)
  To: Mike Ryan; +Cc: Jens Axboe, fio

very cool, so if I add the changes to init.c and run

    fio --latency-log --output  test.job

I get extra four  files

    -rw-r--r--  1 me staff   14937 Aug  8  2012 fiotest_lat.log
    -rw-r--r--  1 me staff       0 Aug  8  2012 fiotest_slat.log
    -rw-r--r--  1 me staff   14932 Aug  8  2012 fiotest_clat.log
    -rw-r--r--  1 me staff 4194304 Aug  8  2012 fiotest.1.0

What's the format?

    $ more fiotest_lat*
      1, 19, 1, 4096
      1, 18, 1, 4096
      1, 8, 1, 4096
      1, 7, 1, 4096
      1, 7, 1, 4096

What's the format? OK, found http://www.spinics.net/lists/fio/msg01064.html

Format of entries is:

           time, rate/latency, data direction, block size

     Time: in milliseconds. Bandwidth logs are usually 500 or 1000ms apart; that
     can be controlled by the config file with "bwavgtime=[x ms]".

      Rate/latency: for bandwidth, this is in KB/sec. For latency, it's
      microseconds.

      Data direction: 0 is read, 1 is write.

      Block size: block size of IOs in bytes.


what is the format of the file fiotest.1.0 ?
Is there a way to get the latency files without this file to avoid too
much output.


Thanks

- Kyle

On Tue, Aug 7, 2012 at 7:47 AM, Mike Ryan <mike.ryan@inktank.com> wrote:
>
> On Tue, Aug 07, 2012 at 03:43:06PM +0200, Jens Axboe wrote:
> > >   fio --latency-log=/tmp/log --output=/tmp/log random_write.fio
> >
> > The latency/bw logs are named from the job name, so you can't actually
> > give it a specific name with the (global) command line option. You'd
> > need to use the job option to do that.
>
> The argument requires an option. It appears that option is discarded.
>
> > That said, it does look broken in that we don't inherit the global
> > setting. Does the below make it work?
>
> Yes! The files are named log_lat.log, log_slat.log, and log_clat.log.
> They are not named after the job.
> --
> To unsubscribe from this list: send the line "unsubscribe fio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html




--
- Kyle

O: +1.415.341.3430
F: +1.650.494.1676
275 Middlefield Road, Suite 50
Menlo Park, CA 94025
http://www.delphix.com


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

end of thread, other threads:[~2012-08-08  5:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-07  1:03 generating latency logs Mike Ryan
2012-08-07 13:43 ` Jens Axboe
2012-08-07 14:47   ` Mike Ryan
2012-08-08  5:23     ` Kyle Hailey
2012-08-08  5:26     ` Kyle Hailey

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.