one by appending a ':<nr>' to the end of the string given.
For a random read, it would look like 'rw=randread:8' for
passing in an offset modifier with a value of 8. If the
- postfix is used with a sequential IO pattern, then the value
+ suffix is used with a sequential IO pattern, then the value
specified will be added to the generated offset for each IO.
For instance, using rw=write:4k will skip 4k for every
write. It turns sequential IO into sequential IO with holes.
create_on_open=bool Don't pre-setup the files for IO, just create open()
when it's time to do IO to that file.
+create_only=bool If true, fio will only run the setup phase of the job.
+ If files need to be laid out or updated on disk, only
+ that will be done. The actual job contents are not
+ executed.
+
pre_read=bool If this is given, files will be pre-read into memory before
starting the given IO operation. This will also clear
the 'invalidate' flag, since it is pointless to pre-read
file. Can be used to store data of the bandwidth of the
jobs in their lifetime. The included fio_generate_plots
script uses gnuplot to turn these text files into nice
- graphs. See write_log_log for behaviour of given
- filename. For this option, the postfix is _bw.log.
+ graphs. See write_lat_log for behaviour of given
+ filename. For this option, the suffix is _bw.log.
write_lat_log=str Same as write_bw_log, except that this option stores io
submission, completion, and total latencies instead. If no
util= The disk utilization. A value of 100% means we kept the disk
busy constantly, 50% would be a disk idling half of the time.
+It is also possible to get fio to dump the current output while it is
+running, without terminating the job. To do that, send fio the USR1 signal.
+
7.0 Terse output
----------------
.PHONY: FORCE cscope
FIO-VERSION-FILE: FORCE
- @$(SHELL_PATH) ./FIO-VERSION-GEN
+ @$(SHELL) ./FIO-VERSION-GEN
-include FIO-VERSION-FILE
CFLAGS += -DFIO_VERSION='"$(FIO_VERSION)"'
$(PROGS): .depend
clean: FORCE
- -rm -f .depend $(GFIO_OBJS) $(FIO_OBJS) $(T_OBJS) $(PROGS) $(T_PROGS) core.* core gfio FIO-VERSION-FILE
+ -rm -f .depend $(GFIO_OBJS )$(OBJS) $(T_OBJS) $(PROGS) $(T_PROGS) core.* core gfio FIO-VERSION-FILE
cscope:
@cscope -b -R
}
}
- if (o->cgroup_weight && cgroup_setup(td, cgroup_list, &cgroup_mnt))
+ if (td->o.cgroup && cgroup_setup(td, cgroup_list, &cgroup_mnt))
goto err;
errno = 0;
o->create_serialize = le32_to_cpu(top->create_serialize);
o->create_fsync = le32_to_cpu(top->create_fsync);
o->create_on_open = le32_to_cpu(top->create_on_open);
+ o->create_only = le32_to_cpu(top->create_only);
o->end_fsync = le32_to_cpu(top->end_fsync);
o->pre_read = le32_to_cpu(top->pre_read);
o->sync_io = le32_to_cpu(top->sync_io);
top->create_serialize = cpu_to_le32(o->create_serialize);
top->create_fsync = cpu_to_le32(o->create_fsync);
top->create_on_open = cpu_to_le32(o->create_on_open);
+ top->create_only = cpu_to_le32(o->create_only);
top->end_fsync = cpu_to_le32(o->end_fsync);
top->pre_read = cpu_to_le32(o->pre_read);
top->sync_io = cpu_to_le32(o->sync_io);
{
static int linelen_last;
static int eta_good;
- char output[512], *p = output;
+ char output[REAL_MAX_JOBS + 512], *p = output;
char eta_str[128];
double perc = 0.0;
int i2p = 0;
char perc_str[32];
char *iops_str[2];
char *rate_str[2];
+ size_t left;
int l;
if ((!je->eta_sec && !eta_good) || je->nr_ramp == je->nr_running)
iops_str[0] = num2str(je->iops[0], 4, 1, 0);
iops_str[1] = num2str(je->iops[1], 4, 1, 0);
- l = sprintf(p, ": [%s] [%s] [%s/%s /s] [%s/%s iops] [eta %s]",
+ left = sizeof(output) - (p - output) - 1;
+
+ l = snprintf(p, left, ": [%s] [%s] [%s/%s /s] [%s/%s iops] [eta %s]",
je->run_str, perc_str, rate_str[0],
rate_str[1], iops_str[0], iops_str[1], eta_str);
p += l;
dprint(FD_FILE, "setup files\n");
if (td->o.read_iolog_file)
- return 0;
+ goto done;
/*
* if ioengine defines a setup() method, it's responsible for
*/
if (!td->o.read_iolog_file)
td->total_io_size = td->o.size * td->o.loops;
+
+done:
+ if (td->o.create_only)
+ td->done = 1;
+
return 0;
err_offset:
log_err("%s: you need to specify valid offset=\n", td->o.name);
.P
For mixed I/O, the default split is 50/50. For certain types of io the result
may still be skewed a bit, since the speed may be different. It is possible to
-specify a number of IO's to do before getting a new offset, this is one by
+specify a number of IO's to do before getting a new offset, this is done by
appending a `:\fI<nr>\fR to the end of the string given. For a random read, it
would look like \fBrw=randread:8\fR for passing in an offset modifier with a
value of 8. If the postfix is used with a sequential IO pattern, then the value
If true, sync file contents on close. This differs from \fBend_fsync\fR in that
it will happen on every close, not just at the end of the job. Default: false.
.TP
-.BI rwmixcycle \fR=\fPint
-How many milliseconds before switching between reads and writes for a mixed
-workload. Default: 500ms.
-.TP
.BI rwmixread \fR=\fPint
Percentage of a mixed workload that should be reads. Default: 50.
.TP
.BI create_on_open \fR=\fPbool
If true, the files are not created until they are opened for IO by the job.
.TP
+.BI create_only \fR=\fPbool
+If true, fio will only run the setup phase of the job. If files need to be
+laid out or updated on disk, only that will be done. The actual job contents
+are not executed.
+.TP
.BI pre_read \fR=\fPbool
If this is given, files will be pre-read into memory before starting the given
IO operation. This will also clear the \fR \fBinvalidate\fR flag, since it is
Disk utilization.
.RE
.PD
+.P
+It is also possible to get fio to dump the current output while it is
+running, without terminating the job. To do that, send fio the \fBUSR1\fR
+signal.
.SH TERSE OUTPUT
If the \fB\-\-minimal\fR option is given, the results will be printed in a
semicolon-delimited format suitable for scripted use - a job description
.category = FIO_OPT_C_FILE,
.group = FIO_OPT_G_INVALID,
},
+ {
+ .name = "create_only",
+ .type = FIO_OPT_BOOL,
+ .off1 = td_var_offset(create_only),
+ .help = "Only perform file creation phase",
+ .def = "0",
+ },
{
.name = "pre_read",
.lname = "Pre-read files",
#define POLLHUP 1
#define SIGCONT 0
+#define SIGUSR1 1
typedef int sigset_t;
typedef int siginfo_t;
@echo off\r
setlocal enabledelayedexpansion\r
-set /a counter=4\r
-for /f "tokens=3" %%i in (..\..\fio_version.h) do (\r
- if "!counter!"=="4" set FIO_MAJOR=%%i\r
- if "!counter!"=="5" set FIO_MINOR=%%i\r
- if "!counter!"=="6" set FIO_PATCH=%%i\r
-set /a counter+=1\r
+set /a counter=1\r
+for /f "tokens=3" %%i in (..\..\FIO-VERSION-FILE) do (\r
+ if "!counter!"=="1" set FIO_VERSION=%%i\r
+ set /a counter+=1\r
)\r
\r
if "%1"=="x86" set FIO_ARCH=x86\r
@if ERRORLEVEL 1 goto end\r
"%WIX%bin\candle" -nologo -arch %FIO_ARCH% examples.wxs\r
@if ERRORLEVEL 1 goto end\r
-"%WIX%bin\light" -nologo install.wixobj examples.wixobj -ext WixUIExtension -out fio-%FIO_MAJOR%.%FIO_MINOR%.%FIO_PATCH%-%FIO_ARCH%.msi\r
+"%WIX%bin\light" -nologo install.wixobj examples.wixobj -ext WixUIExtension -out %FIO_VERSION%-%FIO_ARCH%.msi\r
:end
\ No newline at end of file
<?define ProgramDirectory = ProgramFiles64Folder ?>\r
<?endif?>\r
\r
- <Product Id="*"\r
+ <Product Id="CCE88492-8C5A-4EAF-8B82-E22A90CEC47B"\r
Codepage="1252" Language="1033"\r
- Manufacturer="fio" Name="FIO"\r
- UpgradeCode="{2338A332-5511-43cf-b9BD-5C60496CCFCC}" Version="$(env.FIO_VERSION)">\r
+ Manufacturer="fio" Name="fio"\r
+ UpgradeCode="2338A332-5511-43cf-b9BD-5C60496CCFCC" Version="2.0.7">\r
<Package \r
Comments="Contact: Your local administrator"\r
Description="Flexible IO Tester"\r
if (ts->runtime[ddir]) {
uint64_t runt = ts->runtime[ddir];
- bw = ts->io_bytes[ddir] / runt;
+ bw = ((1000 * ts->io_bytes[ddir]) / runt) / 1024;
iops = (1000 * (uint64_t) ts->total_io_u[ddir]) / runt;
}
unsigned int create_serialize;
unsigned int create_fsync;
unsigned int create_on_open;
+ unsigned int create_only;
unsigned int end_fsync;
unsigned int pre_read;
unsigned int sync_io;
uint32_t create_serialize;
uint32_t create_fsync;
uint32_t create_on_open;
+ uint32_t create_only;
uint32_t end_fsync;
uint32_t pre_read;
uint32_t sync_io;