disk log, that can quickly grow to a very large size. Setting
this option makes fio average the each log entry over the
specified period of time, reducing the resolution of the log.
- Defaults to 0.
+ See log_max as well. Defaults to 0, logging all entries.
+log_max=bool If log_avg_msec is set, fio logs the average over that window.
+ If you instead want to log the maximum value, set this option
+ to 1. Defaults to 0, meaning that averaged values are logged.
+.
log_offset=int If this is set, the iolog options will include the byte
offset for the IO entry as well as the other data values.
o->allrand_repeatable = le32_to_cpu(top->allrand_repeatable);
o->rand_seed = le64_to_cpu(top->rand_seed);
o->log_avg_msec = le32_to_cpu(top->log_avg_msec);
+ o->log_max = le32_to_cpu(top->log_max);
o->log_offset = le32_to_cpu(top->log_offset);
o->log_gz = le32_to_cpu(top->log_gz);
o->log_gz_store = le32_to_cpu(top->log_gz_store);
top->allrand_repeatable = cpu_to_le32(o->allrand_repeatable);
top->rand_seed = __cpu_to_le64(o->rand_seed);
top->log_avg_msec = cpu_to_le32(o->log_avg_msec);
+ top->log_max = cpu_to_le32(o->log_max);
top->log_offset = cpu_to_le32(o->log_offset);
top->log_gz = cpu_to_le32(o->log_gz);
top->log_gz_store = cpu_to_le32(o->log_gz_store);
By default, fio will log an entry in the iops, latency, or bw log for every
IO that completes. When writing to the disk log, that can quickly grow to a
very large size. Setting this option makes fio average the each log entry
-over the specified period of time, reducing the resolution of the log.
-Defaults to 0.
+over the specified period of time, reducing the resolution of the log. See
+\fBlog_max\fR as well. Defaults to 0, logging all entries.
+.TP
+.BI log_max \fR=\fPbool
+If \fBlog_avg_msec\fR is set, fio logs the average over that window. If you
+instead want to log the maximum value, set this option to 1. Defaults to
+0, meaning that averaged values are logged.
.TP
.BI log_offset \fR=\fPbool
If this is set, the iolog options will include the byte offset for the IO
.category = FIO_OPT_C_LOG,
.group = FIO_OPT_G_INVALID,
},
+ {
+ .name = "log_max_value",
+ .lname = "Log maximum instead of average",
+ .type = FIO_OPT_BOOL,
+ .off1 = td_var_offset(log_max),
+ .help = "Log max sample in a window instead of average",
+ .def = "0",
+ .category = FIO_OPT_C_LOG,
+ .group = FIO_OPT_G_INVALID,
+ },
{
.name = "log_offset",
.lname = "Log offset of IO",
};
enum {
- FIO_SERVER_VER = 51,
+ FIO_SERVER_VER = 52,
FIO_SERVER_MAX_FRAGMENT_PDU = 1024,
FIO_SERVER_MAX_CMD_MB = 2048,
}
static void __add_stat_to_log(struct io_log *iolog, enum fio_ddir ddir,
- unsigned long elapsed)
+ unsigned long elapsed, bool log_max)
{
/*
* Note an entry in the log. Use the mean from the logged samples,
if (iolog->avg_window[ddir].samples) {
unsigned long val;
- val = iolog->avg_window[ddir].mean.u.f + 0.50;
+ if (log_max)
+ val = iolog->avg_window[ddir].max_val;
+ else
+ val = iolog->avg_window[ddir].mean.u.f + 0.50;
+
__add_log_sample(iolog, val, ddir, 0, elapsed, 0);
}
reset_io_stat(&iolog->avg_window[ddir]);
}
-static void _add_stat_to_log(struct io_log *iolog, unsigned long elapsed)
+static void _add_stat_to_log(struct io_log *iolog, unsigned long elapsed,
+ bool log_max)
{
int ddir;
for (ddir = 0; ddir < DDIR_RWDIR_CNT; ddir++)
- __add_stat_to_log(iolog, ddir, elapsed);
+ __add_stat_to_log(iolog, ddir, elapsed, log_max);
}
static void add_log_sample(struct thread_data *td, struct io_log *iolog,
if (this_window < iolog->avg_msec)
return;
- _add_stat_to_log(iolog, elapsed);
+ _add_stat_to_log(iolog, elapsed, td->o.log_max != 0);
iolog->avg_last = elapsed;
}
elapsed = mtime_since_now(&td->epoch);
if (td->clat_log)
- _add_stat_to_log(td->clat_log, elapsed);
+ _add_stat_to_log(td->clat_log, elapsed, td->o.log_max != 0);
if (td->slat_log)
- _add_stat_to_log(td->slat_log, elapsed);
+ _add_stat_to_log(td->slat_log, elapsed, td->o.log_max != 0);
if (td->lat_log)
- _add_stat_to_log(td->lat_log, elapsed);
+ _add_stat_to_log(td->lat_log, elapsed, td->o.log_max != 0);
if (td->bw_log)
- _add_stat_to_log(td->bw_log, elapsed);
+ _add_stat_to_log(td->bw_log, elapsed, td->o.log_max != 0);
if (td->iops_log)
- _add_stat_to_log(td->iops_log, elapsed);
+ _add_stat_to_log(td->iops_log, elapsed, td->o.log_max != 0);
}
void add_agg_sample(unsigned long val, enum fio_ddir ddir, unsigned int bs)
unsigned long long rand_seed;
unsigned int dep_use_os_rand;
unsigned int log_avg_msec;
+ unsigned int log_max;
unsigned int log_offset;
unsigned int log_gz;
unsigned int log_gz_store;
uint64_t rand_seed;
uint32_t dep_use_os_rand;
uint32_t log_avg_msec;
+ uint32_t log_max;
uint32_t log_offset;
uint32_t log_gz;
uint32_t log_gz_store;
uint32_t random_distribution;
uint32_t exitall_error;
+ uint32_t pad0;
fio_fp64_t zipf_theta;
fio_fp64_t pareto_h;
uint32_t fsync_blocks;
uint32_t fdatasync_blocks;
uint32_t barrier_blocks;
+ uint32_t pad1;
uint64_t start_delay;
uint64_t start_delay_high;
uint64_t timeout;
uint64_t trim_backlog;
uint32_t clat_percentiles;
uint32_t percentile_precision;
+ uint32_t pad2;
fio_fp64_t percentile_list[FIO_IO_U_LIST_MAX_LEN];
uint8_t read_iolog_file[FIO_TOP_STR_MAX];
uint32_t rate_iops[DDIR_RWDIR_CNT];
uint32_t rate_iops_min[DDIR_RWDIR_CNT];
uint32_t rate_process;
- uint32_t padding_0; /* for alignment assert */
uint8_t ioscheduler[FIO_TOP_STR_MAX];
uint64_t number_ios;
uint32_t sync_file_range;
+ uint32_t pad3;
uint64_t latency_target;
uint64_t latency_window;