Recent changes (master)
The following changes since commit ae5c7cdd710dfa97705d965dcf001a96504e5f31:
Merge branch 'dedupe_workset' of https://github.com/bardavid/fio (2021-07-15 09:54:03 -0600)
are available in the Git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to 9ce6f6f2bd636e9678982b86d6992ed419634c31:
Merge branch 'evelu-fix-engines' of https://github.com/ErwanAliasr1/fio (2021-07-25 16:48:02 -0600)
----------------------------------------------------------------
Erwan Velu (3):
engines: Adding exec engine
fiograph: Adding exec engine support engines/exec: Code cleanup to remove leaks
Jens Axboe (3):
Merge branch 'evelu-exec' of https://github.com/ErwanAliasr1/fio
engines/exec: style cleanups
Merge branch 'evelu-fix-engines' of https://github.com/ErwanAliasr1/fio
HOWTO | 25 +++ Makefile | 1 + engines/exec.c | 394 +++++++++++++++++++++++++++++++++++++++++++ examples/exec.fio | 36 ++++ examples/exec.png | Bin 0 -> 101933 bytes fio.1 | 28 +++ os/os-windows.h | 1 + tools/fiograph/fiograph.conf | 3 + 8 files changed, 488 insertions(+) create mode 100644 engines/exec.c create mode 100644 examples/exec.fio create mode 100644 examples/exec.png
---
Diff of recent changes:
HOWTO +25 -0
@@ -2139,6 +2139,9 @@ I/O engine achieving higher concurrency and thus throughput than is possible via kernel NFS. + **exec** + Execute 3rd party tools. Could be used to perform monitoring during jobs runtime. + I/O engine specific parameters ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -2566,6 +2569,28 @@ with the caveat that when used on the command line, they must come after the URL in libnfs format, eg nfs://<server|ipv4|ipv6>/path[?arg=val[&arg=val]*] Refer to the libnfs README for more details. +.. option:: program=str : [exec] + + Specify the program to execute. + +.. option:: arguments=str : [exec] + + Specify arguments to pass to program. + Some special variables can be expanded to pass fio's job details to the program. + + **%r** + Replaced by the duration of the job in seconds. + **%n** + Replaced by the name of the job. + +.. option:: grace_time=int : [exec] + + Specify the time between the SIGTERM and SIGKILL signals. Default is 1 second. + +.. option:: std_redirect=boot : [exec] + + If set, stdout and stderr streams are redirected to files named from the job name. Default is true. + I/O depth ~~~~~~~~~
Makefile +1 -0
@@ -57,6 +57,7 @@ SOURCE := $(sort $(patsubst $(SRCDIR)/%,%,$(wildcard $(SRCDIR)/crc/*.c)) \ smalloc.c filehash.c profile.c debug.c engines/cpu.c \ engines/mmap.c engines/sync.c engines/null.c engines/net.c \ engines/ftruncate.c engines/filecreate.c engines/filestat.c engines/filedelete.c \ + engines/exec.c \ server.c client.c iolog.c backend.c libfio.c flow.c cconv.c \ gettime-thread.c helpers.c json.c idletime.c td_error.c \ profiles/tiobench.c profiles/act.c io_u_queue.c filelock.c \
engines/exec.c new file +394 -0
394 lines not on this page · raw message
examples/exec.fio new file +36 -0
@@ -0,0 +1,36 @@ +[global] +time_based +runtime=30 + +[monitoring_noop] +ioengine=exec +program=/usr/sbin/turbostat +arguments=-c package -qS --interval 5 -s Busy%,Bzy_MHz,Avg_MHz,CorWatt,PkgWatt,RAMWatt,PkgTmp + +[cpuload_noop] +ioengine=cpuio +cpuload=100 +numjobs=12 +cpumode=noop + +[sleep] +# Let the processor cooling down for a few seconds +stonewall +ioengine=exec +runtime=10 +program=/bin/sleep +arguments=%r +grace_time=0 +std_redirect=0 + +[monitoring_qsort] +stonewall +ioengine=exec +program=/usr/sbin/turbostat +arguments=-c package -qS --interval 5 -s Busy%,Bzy_MHz,Avg_MHz,CorWatt,PkgWatt,RAMWatt,PkgTmp + +[cpuload_qsort] +ioengine=cpuio +cpuload=100 +numjobs=12 +cpumode=qsort
examples/exec.png new file binary +0 -0
fio.1 +28 -0
@@ -1954,6 +1954,9 @@ I/O engine supporting asynchronous read and write operations to NFS filesystems from userspace via libnfs. This is useful for achieving higher concurrency and thus throughput than is possible via kernel NFS. +.TP +.B exec +Execute 3rd party tools. Could be used to perform monitoring during jobs runtime. .SS "I/O engine specific parameters" In addition, there are some parameters which are only valid when a specific \fBioengine\fR is in use. These are used identically to normal parameters,
@@ -2340,6 +2343,31 @@ Use DAOS container's object class by default. .BI (nfs)nfs_url URL in libnfs format, eg nfs://<server|ipv4|ipv6>/path[?arg=val[&arg=val]*] Refer to the libnfs README for more details. +.TP +.BI (exec)program\fR=\fPstr +Specify the program to execute. +Note the program will receive a SIGTERM when the job is reaching the time limit. +A SIGKILL is sent once the job is over. The delay between the two signals is defined by \fBgrace_time\fR option. +.TP +.BI (exec)arguments\fR=\fPstr +Specify arguments to pass to program. +Some special variables can be expanded to pass fio's job details to the program : +.RS +.RS +.TP +.B %r +replaced by the duration of the job in seconds +.TP +.BI %n +replaced by the name of the job +.RE +.RE +.TP +.BI (exec)grace_time\fR=\fPint +Defines the time between the SIGTERM and SIGKILL signals. Default is 1 second. +.TP +.BI (exec)std_redirect\fR=\fbool +If set, stdout and stderr streams are redirected to files named from the job name. Default is true. .SS "I/O depth" .TP .BI iodepth \fR=\fPint
os/os-windows.h +1 -0
@@ -77,6 +77,7 @@#define SIGCONT 0#define SIGUSR1 1#define SIGUSR2 2 +#define SIGKILL 15/* SIGKILL doesn't exists, let's use SIGTERM */ typedef int sigset_t ;typedef int siginfo_t ;
tools/fiograph/fiograph.conf +3 -0
@@ -35,6 +35,9 @@ specific_options=pool cont chunk_size object_class svcl [ioengine_e4defrag] specific_options=donorname inplace +[ioengine_exec] +specific_options=program arguments grace_time std_redirect + [ioengine_filestat] specific_options=stat_type