The following changes since commit f67bbe85d8e1274163bb28bd870371ca0d8d0d95: Merge branch 'master' of ssh://brick.kernel.dk/data/git/fio (2011-07-19 16:28:33 +0200) are available in the git repository at: git://git.kernel.dk/fio.git master Dan Ehrenberg (2): Respect iodepth_batch_complete=0 in main loop Libaio engine support for iodepth_batch_complete=0 Dave Engberg (1): Fix bsrange read,write value option pairs Jens Axboe (1): Fix --timeout as global parameter Paul Dubs (2): Added description for iops output Addes Trace file format description HOWTO | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++- README | 7 +---- engines/libaio.c | 22 +++++++---------- fio.c | 4 +- init.c | 5 +--- parse.c | 5 ++++ 6 files changed, 83 insertions(+), 26 deletions(-) --- Diff of recent changes: diff --git a/HOWTO b/HOWTO index ce1bd9e..85704ef 100644 --- a/HOWTO +++ b/HOWTO @@ -8,7 +8,7 @@ Table of contents 5. Detailed list of parameters 6. Normal output 7. Terse output - +8. Trace file format 1.0 Overview and history ------------------------ @@ -1203,7 +1203,7 @@ each thread, group of threads, and disks in that order. For each data direction, the output looks like: Client1 (g=0): err= 0: - write: io= 32MB, bw= 666KB/s, runt= 50320msec + write: io= 32MB, bw= 666KB/s, iops=89 , runt= 50320msec slat (msec): min= 0, max= 136, avg= 0.03, stdev= 1.92 clat (msec): min= 0, max= 631, avg=48.50, stdev=86.82 bw (KB/s) : min= 0, max= 1196, per=51.00%, avg=664.02, stdev=681.68 @@ -1221,6 +1221,7 @@ they denote: io= Number of megabytes io performed bw= Average bandwidth rate +iops= Average IOs performed per second runt= The runtime of that thread slat= Submission latency (avg being the average, stdev being the standard deviation). This is the time it took to submit @@ -1333,3 +1334,64 @@ Split up, the format is as follows: Additional Info (dependant on continue_on_error, default off): total # errors, first error code Additional Info (dependant on description being set): Text description + + +8.0 Trace file format +--------------------- +There are two trace file format that you can encounter. The older (v1) format +is unsupported since version 1.20-rc3 (March 2008). It will still be described +below in case that you get an old trace and want to understand it. + +In any case the trace is a simple text file with a single action per line. + + +8.1 Trace file format v1 +------------------------ +Each line represents a single io action in the following format: + +rw, offset, length + +where rw=0/1 for read/write, and the offset and length entries being in bytes. + +This format is not supported in Fio versions => 1.20-rc3. + + +8.2 Trace file format v2 +------------------------ +The second version of the trace file format was added in Fio version 1.17. +It allows to access more then one file per trace and has a bigger set of +possible file actions. + +The first line of the trace file has to be: + +fio version 2 iolog + +Following this can be lines in two different formats, which are described below. + +The file management format: + +filename action + +The filename is given as an absolute path. The action can be one of these: + +add Add the given filename to the trace +open Open the file with the given filename. The filename has to have + been added with the add action before. +close Close the file with the given filename. The file has to have been + opened before. + + +The file io action format: + +filename action offset length + +The filename is given as an absolute path, and has to have been added and opened +before it can be used with this format. The offset and length are given in +bytes. The action can be one of these: + +wait Wait for 'offset' microseconds. Everything below 100 is discarded. +read Read 'length' bytes beginning from 'offset' +write Write 'length' bytes beginning from 'offset' +sync fsync() the file +datasync fdatasync() the file +trim trim the given file from the given 'offset' for 'length' bytes diff --git a/README b/README index 163ee38..7c93d1f 100644 --- a/README +++ b/README @@ -289,11 +289,8 @@ The job file parameters are: can be used to gauge hard drive speed over the entire platter, without reading everything. Both x/y can include k/m/g suffix. - iolog=x Open and read io pattern from file 'x'. The file must - contain one io action per line in the following format: - rw, offset, length - where with rw=0/1 for read/write, and the offset - and length entries being in bytes. + read_iolog=x Open and read io pattern from file 'x'. The file format + is described in the HOWTO. write_iolog=x Write an iolog to file 'x' in the same format as iolog. The iolog options are exclusive, if both given the read iolog will be performed. Specify a separate file diff --git a/engines/libaio.c b/engines/libaio.c index 439cd24..c837ab6 100644 --- a/engines/libaio.c +++ b/engines/libaio.c @@ -62,22 +62,18 @@ static int fio_libaio_getevents(struct thread_data *td, unsigned int min, unsigned int max, struct timespec *t) { struct libaio_data *ld = td->io_ops->data; - int r; + unsigned actual_min = td->o.iodepth_batch_complete == 0 ? 0 : min; + int r, events = 0; do { - r = io_getevents(ld->aio_ctx, min, max, ld->aio_events, t); - if (r >= (int) min) - break; - else if (r == -EAGAIN) { + r = io_getevents(ld->aio_ctx, actual_min, max, ld->aio_events + events, t); + if (r >= 0) + events += r; + else if (r == -EAGAIN) usleep(100); - continue; - } else if (r == -EINTR) - continue; - else if (r != 0) - break; - } while (1); + } while (events < min); - return r; + return r < 0 ? r : events; } static int fio_libaio_queue(struct thread_data *td, struct io_u *io_u) diff --git a/fio.c b/fio.c index 120431e..7396421 100644 --- a/fio.c +++ b/fio.c @@ -557,7 +557,7 @@ sync_done: if (full || !td->o.iodepth_batch_complete) { min_events = min(td->o.iodepth_batch_complete, td->cur_depth); - if (full && !min_events) + if (full && !min_events && td->o.iodepth_batch_complete != 0) min_events = 1; do { @@ -719,7 +719,7 @@ sync_done: if (full || !td->o.iodepth_batch_complete) { min_evts = min(td->o.iodepth_batch_complete, td->cur_depth); - if (full && !min_evts) + if (full && !min_evts && td->o.iodepth_batch_complete != 0) min_evts = 1; if (__should_check_rate(td, 0) || diff --git a/init.c b/init.c index 85bd0f7..98e10f7 100644 --- a/init.c +++ b/init.c @@ -47,7 +47,6 @@ int warnings_fatal = 0; int write_bw_log = 0; int read_only = 0; -static int def_timeout; static int write_lat_log; static int prev_group_jobs; @@ -951,8 +950,6 @@ static int fill_def_thread(void) * fill default options */ fio_fill_default_options(&def_thread); - - def_thread.o.timeout = def_timeout; return 0; } @@ -1160,7 +1157,7 @@ static int parse_cmd_line(int argc, char *argv[]) smalloc_pool_size = atoi(optarg); break; case 't': - def_timeout = atoi(optarg); + def_thread.o.timeout = atoi(optarg); break; case 'l': write_lat_log = 1; diff --git a/parse.c b/parse.c index ad2782f..3e15b54 100644 --- a/parse.c +++ b/parse.c @@ -453,6 +453,11 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data, strncpy(tmp, ptr, sizeof(tmp) - 1); + /* Handle bsrange with separate read,write values: */ + p1 = strchr(tmp, ','); + if (p1) + *p1 = '\0'; + p1 = strchr(tmp, '-'); if (!p1) { p1 = strchr(tmp, ':'); -- To unsubscribe from this list: send the line "unsubscribe fio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html