in the specified log file. This feature depends on the
availability of zlib.
-log_store_compressed=bool If set, and log_compression is also set,
- fio will store the log files in a compressed format. They
- can be decompressed with fio, using the --inflate-log
- command line parameter. The files will be stored with a
- .fz suffix.
+log_compression_cpus=str Define the set of CPUs that are allowed to
+ handle online log compression for the IO jobs. This can
+ provide better isolation between performance sensitive jobs,
+ and background compression work.
+
+log_store_compressed=bool If set, fio will store the log files in a
+ compressed format. They can be decompressed with fio, using
+ the --inflate-log command line parameter. The files will be
+ stored with a .fz suffix.
block_error_percentiles=bool If set, record errors in trim block-sized
units from writes and trims and output a histogram of
#if 0
uint8_t cpumask[FIO_TOP_STR_MAX];
uint8_t verify_cpumask[FIO_TOP_STR_MAX];
+ uint8_t log_gz_cpumask[FIO_TOP_STR_MAX];
#endif
}
#if 0
uint8_t cpumask[FIO_TOP_STR_MAX];
uint8_t verify_cpumask[FIO_TOP_STR_MAX];
+ uint8_t log_gz_cpumask[FIO_TOP_STR_MAX];
#endif
}
normally at the end of a run, by decompressing the chunks and storing them
in the specified log file. This feature depends on the availability of zlib.
.TP
+.BI log_compression_cpus \fR=\fPstr
+Define the set of CPUs that are allowed to handle online log compression
+for the IO jobs. This can provide better isolation between performance
+sensitive jobs, and background compression work.
+.TP
.BI log_store_compressed \fR=\fPbool
-If set, and \fBlog\fR_compression is also set, fio will store the log files in
-a compressed format. They can be decompressed with fio, using the
-\fB\-\-inflate-log\fR command line parameter. The files will be stored with a
-\fB\.fz\fR suffix.
+If set, fio will store the log files in a compressed format. They can be
+decompressed with fio, using the \fB\-\-inflate-log\fR command line parameter.
+The files will be stored with a \fB\.fz\fR suffix.
.TP
.BI block_error_percentiles \fR=\fPbool
If set, record errors in trim block-sized units from writes and trims and output
goto done;
}
+static int gz_init_worker(struct submit_worker *sw)
+{
+ struct thread_data *td = sw->wq->td;
+
+ if (!fio_option_is_set(&td->o, log_gz_cpumask))
+ return 0;
+
+ if (fio_setaffinity(gettid(), td->o.log_gz_cpumask) == -1) {
+ log_err("gz: failed to set CPU affinity\n");
+ return 1;
+ }
+
+ return 0;
+}
+
static struct workqueue_ops log_compress_wq_ops = {
- .fn = gz_work,
+ .fn = gz_work,
+ .init_worker_fn = gz_init_worker,
.nice = 1,
};
return set_cpus_allowed(td, &td->o.verify_cpumask, input);
}
+
+static int str_log_cpus_allowed_cb(void *data, const char *input)
+{
+ struct thread_data *td = data;
+
+ if (parse_dryrun())
+ return 0;
+
+ return set_cpus_allowed(td, &td->o.log_gz_cpumask, input);
+}
+
#endif
#ifdef CONFIG_LIBNUMA
.category = FIO_OPT_C_LOG,
.group = FIO_OPT_G_INVALID,
},
+#ifdef FIO_HAVE_CPU_AFFINITY
+ {
+ .name = "log_compression_cpus",
+ .lname = "Log Compression CPUs",
+ .type = FIO_OPT_STR,
+ .cb = str_log_cpus_allowed_cb,
+ .off1 = td_var_offset(log_gz_cpumask),
+ .parent = "log_compression",
+ .help = "Limit log compression to these CPUs",
+ .category = FIO_OPT_C_LOG,
+ .group = FIO_OPT_G_INVALID,
+ },
+#endif
{
.name = "log_store_compressed",
.lname = "Log store compressed",
};
enum {
- FIO_SERVER_VER = 48,
+ FIO_SERVER_VER = 49,
FIO_SERVER_MAX_FRAGMENT_PDU = 1024,
FIO_SERVER_MAX_CMD_MB = 2048,
unsigned int numjobs;
os_cpu_mask_t cpumask;
os_cpu_mask_t verify_cpumask;
+ os_cpu_mask_t log_gz_cpumask;
unsigned int cpus_allowed_policy;
char *numa_cpunodes;
unsigned short numa_mem_mode;
uint32_t numjobs;
uint8_t cpumask[FIO_TOP_STR_MAX];
uint8_t verify_cpumask[FIO_TOP_STR_MAX];
+ uint8_t log_gz_cpumask[FIO_TOP_STR_MAX];
uint32_t cpus_allowed_policy;
uint32_t iolog;
uint32_t rwmixcycle;