summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HOWTO12
-rw-r--r--backend.c2
-rw-r--r--cconv.c4
-rw-r--r--examples/poisson-rate-submission.fio2
-rw-r--r--fio.112
-rw-r--r--fio.h5
-rw-r--r--options.c26
-rw-r--r--thread_options.h4
8 files changed, 42 insertions, 25 deletions
diff --git a/HOWTO b/HOWTO
index 2742fd79..e259aa7f 100644
--- a/HOWTO
+++ b/HOWTO
@@ -1064,11 +1064,13 @@ rate_iops_min=int If fio doesn't meet this rate of IO, it will cause
the job to exit. The same format as rate is used for read vs
write separation.
-rate_poisson=bool Real world random request flow follows Poisson process
- (https://en.wikipedia.org/wiki/Poisson_process). With
- rate_poisson=1, fio tries to simulate request flow under Poisson
- process (instead of even distribution, which is the default).
- Default: false.
+rate_process=str This option controls how fio manages rated IO
+ submissions. The default is 'linear', which submits IO in a
+ linear fashion with fixed delays between IOs that gets
+ adjusted based on IO completion rates. If this is set to
+ 'poisson', fio will submit IO based on a more real world
+ random request flow, known as the Poisson process
+ (https://en.wikipedia.org/wiki/Poisson_process).
latency_target=int If set, fio will attempt to find the max performance
point that the given workload will run at while maintaining a
diff --git a/backend.c b/backend.c
index b329fa31..aa94acf2 100644
--- a/backend.c
+++ b/backend.c
@@ -782,7 +782,7 @@ static long long usec_for_io(struct thread_data *td, enum fio_ddir ddir)
bytes = td->rate_io_issue_bytes[ddir];
bps = td->rate_bps[ddir];
- if (td->o.poisson_rate) {
+ if (td->o.rate_process == RATE_PROCESS_POISSON) {
uint64_t val;
iops = bps / td->o.bs[ddir];
val = (int64_t) (1000000 / iops) *
diff --git a/cconv.c b/cconv.c
index 26b90b93..c309578c 100644
--- a/cconv.c
+++ b/cconv.c
@@ -254,7 +254,7 @@ void convert_thread_options_to_cpu(struct thread_options *o,
o->per_job_logs = le32_to_cpu(top->per_job_logs);
o->trim_backlog = le64_to_cpu(top->trim_backlog);
- o->poisson_rate = le32_to_cpu(top->poisson_rate);
+ o->rate_process = le32_to_cpu(top->rate_process);
for (i = 0; i < FIO_IO_U_LIST_MAX_LEN; i++)
o->percentile_list[i].u.f = fio_uint64_to_double(le64_to_cpu(top->percentile_list[i].u.i));
@@ -475,7 +475,7 @@ void convert_thread_options_to_net(struct thread_options_pack *top,
top->trim_backlog = __cpu_to_le64(o->trim_backlog);
top->offset_increment = __cpu_to_le64(o->offset_increment);
top->number_ios = __cpu_to_le64(o->number_ios);
- top->poisson_rate = cpu_to_le32(o->poisson_rate);
+ top->rate_process = cpu_to_le32(o->rate_process);
for (i = 0; i < FIO_IO_U_LIST_MAX_LEN; i++)
top->percentile_list[i].u.i = __cpu_to_le64(fio_double_to_uint64(o->percentile_list[i].u.f));
diff --git a/examples/poisson-rate-submission.fio b/examples/poisson-rate-submission.fio
index 6a94df8a..4bb28f21 100644
--- a/examples/poisson-rate-submission.fio
+++ b/examples/poisson-rate-submission.fio
@@ -11,4 +11,4 @@ rate_iops=50
# Real world random request flow follows Poisson process. To give better
# insight on latency distribution, we simulate request flow under Poisson
# process.
-rate_poisson=1 \ No newline at end of file
+rate_process=poisson
diff --git a/fio.1 b/fio.1
index 1b4c8669..6f72ec0f 100644
--- a/fio.1
+++ b/fio.1
@@ -963,11 +963,13 @@ size is used as the metric.
If this rate of I/O is not met, the job will exit. The same format as \fBrate\fR
is used for read vs write separation.
.TP
-.BI rate_poisson \fR=\fPbool
-Real world random request flow follows Poisson process
-(https://en.wikipedia.org/wiki/Poisson_process). With \fBrate_poisson\fR=1, fio
-tries to simulate request flow under Poisson process (instead of even
-distribution, which is the default). Default: false.
+.BI rate_process \fR=\fPstr
+This option controls how fio manages rated IO submissions. The default is
+\fBlinear\fR, which submits IO in a linear fashion with fixed delays between
+IOs that gets adjusted based on IO completion rates. If this is set to
+\fBpoisson\fR, fio will submit IO based on a more real world random request
+flow, known as the Poisson process
+(https://en.wikipedia.org/wiki/Poisson_process).
.TP
.BI rate_cycle \fR=\fPint
Average bandwidth for \fBrate\fR and \fBrate_min\fR over this number of
diff --git a/fio.h b/fio.h
index 7b198b21..a2b3d9ff 100644
--- a/fio.h
+++ b/fio.h
@@ -101,7 +101,10 @@ enum {
enum {
IO_MODE_INLINE = 0,
- IO_MODE_OFFLOAD,
+ IO_MODE_OFFLOAD = 1,
+
+ RATE_PROCESS_LINEAR = 0,
+ RATE_PROCESS_POISSON = 1,
};
/*
diff --git a/options.c b/options.c
index 7f663bb8..a61606c6 100644
--- a/options.c
+++ b/options.c
@@ -2857,16 +2857,26 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
.group = FIO_OPT_G_RATE,
},
{
- .name = "rate_poisson",
- .lname = "simulate requests under Poisson process",
- .type = FIO_OPT_BOOL,
- .off1 = td_var_offset(poisson_rate),
- .help = "With rate limit, simulate requests that follow Poisson process",
- .def = "0",
- .parent = "rate",
- .hide = 1,
+ .name = "rate_process",
+ .lname = "Rate Process",
+ .type = FIO_OPT_STR,
+ .off1 = td_var_offset(rate_process),
+ .help = "What process controls how rated IO is managed",
+ .def = "linear",
.category = FIO_OPT_C_IO,
.group = FIO_OPT_G_RATE,
+ .posval = {
+ { .ival = "linear",
+ .oval = RATE_PROCESS_LINEAR,
+ .help = "Linear rate of IO",
+ },
+ {
+ .ival = "poisson",
+ .oval = RATE_PROCESS_POISSON,
+ .help = "Rate follows Poisson process",
+ },
+ },
+ .parent = "rate",
},
{
.name = "rate_cycle",
diff --git a/thread_options.h b/thread_options.h
index 06707944..567df819 100644
--- a/thread_options.h
+++ b/thread_options.h
@@ -231,7 +231,7 @@ struct thread_options {
unsigned int io_submit_mode;
unsigned int rate_iops[DDIR_RWDIR_CNT];
unsigned int rate_iops_min[DDIR_RWDIR_CNT];
- unsigned int poisson_rate;
+ unsigned int rate_process;
char *ioscheduler;
@@ -472,7 +472,7 @@ struct thread_options_pack {
uint32_t io_submit_mode;
uint32_t rate_iops[DDIR_RWDIR_CNT];
uint32_t rate_iops_min[DDIR_RWDIR_CNT];
- uint32_t poisson_rate;
+ uint32_t rate_process;
uint32_t padding_0; /* for alignment assert */
uint8_t ioscheduler[FIO_TOP_STR_MAX];