Skip to contentSkip to conversation

Add support for specifying ramp up period by amount of IO

PATCH In review Jan Kara 2 participants 9 messages Dec 19, 2025 – Jan 7

lore
Share & tools
lore

Jan Kara

author
#0 lore raw

v2 cover Add support for specifying ramp up period by amount of IO

Hello!

In some cases the ramp up period is not easy to define by amount of time. This is for example a case of buffered writes measurement where we want to start measuring only once dirty throttling kicks in. The time until dirty throttling kicks in depends on dirty limit (easy to figure out) and speed of writes to the page cache (difficult to know in advance). This patch series adds to fio an option to specify ramp up period in terms of amount to IO - i.e., the ramp up period finishes once given amount of IO is done.

Changes since v1:
* Improved documentation to explain behavior with group reporting, replace wrong note about default unit being megabytes
* Add sanity checks for inconsistent ramp_size values within reporting group and usage of both ramp_size and ramp_time for a single job.
* Fix fio server support for the new option

Honza

Previous versions:

author
#1 lore raw

PATCH v2 1/5 time: rename in_ramp_time() and ramp_time_over()

Rename in_ramp_time() and ramp_time_over() to in_ramp_period() and ramp_period_over() respectively. We will be adding other not time-based methods for determining whether the load is ramping up so the old names would be confusing.

---
 backend.c  | 12 ++++++------
 eta.c      |  6 +++---
 fio.h      |  2 +-
 fio_time.h |  4 ++--
 io_u.c     |  4 ++--
 stat.c     |  2 +-
 time.c     | 14 +++++++-------
 7 files changed, 22 insertions(+), 22 deletions(-)
backend.c +6 -6
index 13c77552a1ed..1e4c4a38369c 100644
@@ -298,7 +298,7 @@ static inline void update_ts_cache(struct thread_data *td)
 
 static inline bool runtime_exceeded(struct thread_data *td, struct timespec *t)
 {
-	if (in_ramp_time(td))
+	if (in_ramp_period(td))
 		return false;
 	if (!td->o.timeout)
 		return false;
@@ -1031,7 +1031,7 @@ static void do_io(struct thread_data *td, uint64_t *bytes_done)
 	for (i = 0; i < DDIR_RWDIR_CNT; i++)
 		bytes_done[i] = td->bytes_done[i];
 
-	if (in_ramp_time(td))
+	if (in_ramp_period(td))
 		td_set_runstate(td, TD_RAMP);
 	else
 		td_set_runstate(td, TD_RUNNING);
@@ -1162,7 +1162,7 @@ static void do_io(struct thread_data *td, uint64_t *bytes_done)
 			else
 				io_u->end_io = verify_io_u;
 			td_set_runstate(td, TD_VERIFYING);
-		} else if (in_ramp_time(td))
+		} else if (in_ramp_period(td))
 			td_set_runstate(td, TD_RAMP);
 		else
 			td_set_runstate(td, TD_RUNNING);
@@ -1232,7 +1232,7 @@ reap:
 		    !td_ioengine_flagged(td, FIO_NOIO))
 			continue;
 
-		if (!in_ramp_time(td) && should_check_rate(td)) {
+		if (!in_ramp_period(td) && should_check_rate(td)) {
 			if (check_min_rate(td, &comp_time)) {
 				if (exitall_on_terminate || td->o.exitall_error)
 					fio_terminate_threads(td->groupid, td->o.exit_what);
@@ -1240,7 +1240,7 @@ reap:
 				break;
 			}
 		}
-		if (!in_ramp_time(td) && td->o.latency_target)
+		if (!in_ramp_period(td) && td->o.latency_target)
 			lat_target_check(td);
 	}
 
@@ -2673,7 +2673,7 @@ reap:
 			if (td->runstate != TD_INITIALIZED)
 				continue;
 
-			if (in_ramp_time(td))
+			if (in_ramp_period(td))
 				td_set_runstate(td, TD_RAMP);
 			else
 				td_set_runstate(td, TD_RUNNING);
eta.c +3 -3
index 16109510067b..947752b9dc17 100644
@@ -274,12 +274,12 @@ static unsigned long thread_eta(struct thread_data *td)
 			uint64_t ramp_time = td->o.ramp_time;
 
 			t_eta = __timeout + start_delay;
-			if (!td->ramp_time_over) {
+			if (!td->ramp_period_over) {
 				t_eta += ramp_time;
 			}
 			t_eta /= 1000000ULL;
 
-			if ((td->runstate == TD_RAMP) && in_ramp_time(td)) {
+			if ((td->runstate == TD_RAMP) && in_ramp_period(td)) {
 				unsigned long ramp_left;
 
 				ramp_left = mtime_since_now(&td->epoch);
@@ -522,7 +522,7 @@ static bool calc_thread_status(struct jobs_eta *je, int force)
 
 	any_td_in_ramp = false;
 	for_each_td(td) {
-		any_td_in_ramp |= in_ramp_time(td);
+		any_td_in_ramp |= in_ramp_period(td);
 	} end_for_each();
 	if (write_bw_log && rate_time > bw_avg_time && !any_td_in_ramp) {
 		calc_rate(unified_rw_rep, rate_time, io_bytes, rate_io_bytes,
fio.h +1 -1
index 037678d182b8..87c20803a929 100644
@@ -417,7 +417,7 @@ struct thread_data {
 	struct timespec terminate_time;
 	unsigned int ts_cache_nr;
 	unsigned int ts_cache_mask;
-	bool ramp_time_over;
+	bool ramp_period_over;
 
 	/*
 	 * Time since last latency_window was started
fio_time.h +2 -2
index 969ad68d5b9c..30de7aca4fb1 100644
@@ -27,8 +27,8 @@ extern uint64_t usec_spin(unsigned int);
 extern uint64_t usec_sleep(struct thread_data *, unsigned long);
 extern void fill_start_time(struct timespec *);
 extern void set_genesis_time(void);
-extern bool ramp_time_over(struct thread_data *);
-extern bool in_ramp_time(struct thread_data *);
+extern bool ramp_period_over(struct thread_data *);
+extern bool in_ramp_period(struct thread_data *);
 extern void fio_time_init(void);
 extern void timespec_add_msec(struct timespec *, unsigned int);
 extern void set_epoch_time(struct thread_data *, clockid_t, clockid_t);
io_u.c +2 -2
index ec3f668cae49..be0a0555098f 100644
@@ -2106,7 +2106,7 @@ static void file_log_write_comp(const struct thread_data *td, struct fio_file *f
 
 static bool should_account(struct thread_data *td)
 {
-	return ramp_time_over(td) && (td->runstate == TD_RUNNING ||
+	return ramp_period_over(td) && (td->runstate == TD_RUNNING ||
 					   td->runstate == TD_VERIFYING);
 }
 
@@ -2333,7 +2333,7 @@ int io_u_queued_complete(struct thread_data *td, int min_evts)
  */
 void io_u_queued(struct thread_data *td, struct io_u *io_u)
 {
-	if (!td->o.disable_slat && ramp_time_over(td) && td->o.stats) {
+	if (!td->o.disable_slat && ramp_period_over(td) && td->o.stats) {
 		if (td->parent)
 			td = td->parent;
 		add_slat_sample(td, io_u);
stat.c +1 -1
index a67d35514d1a..c7c0f2f4a3ef 100644
@@ -3626,7 +3626,7 @@ static int add_iops_samples(struct thread_data *td, struct timespec *t)
 
 static bool td_in_logging_state(struct thread_data *td)
 {
-	if (in_ramp_time(td))
+	if (in_ramp_period(td))
 		return false;
 
 	switch(td->runstate) {
time.c +7 -7
index 7f85c8de3bcb..9625e8cd92af 100644
@@ -110,31 +110,31 @@ uint64_t utime_since_genesis(void)
 	return utime_since_now(&genesis);
 }
 
-bool in_ramp_time(struct thread_data *td)
+bool in_ramp_period(struct thread_data *td)
 {
-	return td->o.ramp_time && !td->ramp_time_over;
+	return td->o.ramp_time && !td->ramp_period_over;
 }
 
 static bool parent_update_ramp(struct thread_data *td)
 {
 	struct thread_data *parent = td->parent;
 
-	if (!parent || parent->ramp_time_over)
+	if (!parent || parent->ramp_period_over)
 		return false;
 
 	reset_all_stats(parent);
-	parent->ramp_time_over = true;
+	parent->ramp_period_over = true;
 	td_set_runstate(parent, TD_RAMP);
 	return true;
 }
 
-bool ramp_time_over(struct thread_data *td)
+bool ramp_period_over(struct thread_data *td)
 {
-	if (!td->o.ramp_time || td->ramp_time_over)
+	if (!td->o.ramp_time || td->ramp_period_over)
 		return true;
 
 	if (utime_since_now(&td->epoch) >= td->o.ramp_time) {
-		td->ramp_time_over = true;
+		td->ramp_period_over = true;
 		reset_all_stats(td);
 		reset_io_stats(td);
 		td_set_runstate(td, TD_RAMP);
Signature · 1 line
2.51.0
author
#2 lore raw

PATCH v2 2/5 td: Initialize ramp_period_over based on options

In reply to Jan Kara

Instead of checking whether ramp_time is specified each time we need to check whether we are in the ramp period, initialize ramp_period_over based on the ramp_time option. This will simplify things more significantly later when ramp up period can be defined in a different way.

---
 fio_time.h |  1 +
 init.c     |  2 ++
 time.c     | 10 ++++++++--
 3 files changed, 11 insertions(+), 2 deletions(-)
fio_time.h +1 -0
index 30de7aca4fb1..c67c9450f484 100644
@@ -29,6 +29,7 @@ extern void fill_start_time(struct timespec *);
 extern void set_genesis_time(void);
 extern bool ramp_period_over(struct thread_data *);
 extern bool in_ramp_period(struct thread_data *);
+extern void td_ramp_period_init(struct thread_data *);
 extern void fio_time_init(void);
 extern void timespec_add_msec(struct timespec *, unsigned int);
 extern void set_epoch_time(struct thread_data *, clockid_t, clockid_t);
init.c +2 -0
index cf66ac2c51f1..8b7728907c7f 100644
@@ -1676,6 +1676,8 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num,
 
 	init_thread_stat_min_vals(&td->ts);
 
+	td_ramp_period_init(td);
+
 	/*
 	 * td->>ddir_seq_nr needs to be initialized to 1, NOT o->ddir_seq_nr,
 	 * so that get_next_offset gets a new random offset the first time it
time.c +8 -2
index 9625e8cd92af..f90f2d9044fc 100644
@@ -112,7 +112,7 @@ uint64_t utime_since_genesis(void)
 
 bool in_ramp_period(struct thread_data *td)
 {
-	return td->o.ramp_time && !td->ramp_period_over;
+	return !td->ramp_period_over;
 }
 
 static bool parent_update_ramp(struct thread_data *td)
@@ -130,7 +130,7 @@ static bool parent_update_ramp(struct thread_data *td)
 
 bool ramp_period_over(struct thread_data *td)
 {
-	if (!td->o.ramp_time || td->ramp_period_over)
+	if (td->ramp_period_over)
 		return true;
 
 	if (utime_since_now(&td->epoch) >= td->o.ramp_time) {
@@ -153,6 +153,12 @@ bool ramp_period_over(struct thread_data *td)
 	return false;
 }
 
+void td_ramp_period_init(struct thread_data *td)
+{
+	if (!td->o.ramp_time)
+		td->ramp_period_over = true;
+}
+
 void fio_time_init(void)
 {
 	int i;
Signature · 1 line
2.51.0
author
#3 lore raw

PATCH v2 3/5 eta: Use in_ramp_period() instead of opencoding it

In reply to Jan Kara
---
 eta.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
eta.c +1 -2
index 947752b9dc17..c6e3cffb81d6 100644
@@ -274,9 +274,8 @@ static unsigned long thread_eta(struct thread_data *td)
 			uint64_t ramp_time = td->o.ramp_time;
 
 			t_eta = __timeout + start_delay;
-			if (!td->ramp_period_over) {
+			if (in_ramp_period(td))
 				t_eta += ramp_time;
-			}
 			t_eta /= 1000000ULL;
 
 			if ((td->runstate == TD_RAMP) && in_ramp_period(td)) {
Signature · 1 line
2.51.0
author
#4 lore raw

PATCH v2 4/5 time: Evaluate ramp up condition once per second

In reply to Jan Kara

Instead of evaluating whether ramp up period has finished on each IO submission and completion evaluate it once per second and set appropriate state variable in thread_data. Later when ramp up period end condition will be more complex and would involve stat data from all threads, it would unnecessarily slow down IO.

---
 fio.h           |  2 +-
 fio_time.h      |  5 ++++
 helper_thread.c |  8 +++++-
 time.c          | 66 +++++++++++++++++++++++++++++++++----------------
 4 files changed, 58 insertions(+), 23 deletions(-)
fio.h +1 -1
index 87c20803a929..fdd36fa49c95 100644
@@ -417,7 +417,7 @@ struct thread_data {
 	struct timespec terminate_time;
 	unsigned int ts_cache_nr;
 	unsigned int ts_cache_mask;
-	bool ramp_period_over;
+	unsigned int ramp_period_state;
 
 	/*
 	 * Time since last latency_window was started
fio_time.h +5 -0
index c67c9450f484..54dad8c7812e 100644
@@ -8,6 +8,10 @@
 /* IWYU pragma: end_exports */
 #include "lib/types.h"
 
+#define RAMP_PERIOD_CHECK_MSEC 1000
+
+extern bool ramp_period_enabled;
+
 struct thread_data;
 extern uint64_t ntime_since(const struct timespec *, const struct timespec *);
 extern uint64_t ntime_since_now(const struct timespec *);
@@ -27,6 +31,7 @@ extern uint64_t usec_spin(unsigned int);
 extern uint64_t usec_sleep(struct thread_data *, unsigned long);
 extern void fill_start_time(struct timespec *);
 extern void set_genesis_time(void);
+extern int ramp_period_check(void);
 extern bool ramp_period_over(struct thread_data *);
 extern bool in_ramp_period(struct thread_data *);
 extern void td_ramp_period_init(struct thread_data *);
helper_thread.c +7 -1
index fed21d1d61e7..88614e58e5a8 100644
@@ -290,7 +290,13 @@ static void *helper_thread_main(void *data)
 			.interval_ms = steadystate_enabled ? ss_check_interval :
 				0,
 			.func = steadystate_check,
-		}
+		},
+		{
+			.name = "ramp_period",
+			.interval_ms = ramp_period_enabled ?
+				RAMP_PERIOD_CHECK_MSEC : 0,
+			.func = ramp_period_check,
+		},
 	};
 	struct timespec ts;
 	long clk_tck;
time.c +45 -21

102 lines not on this page · raw message

Signature · 1 line
2.51.0
author
#5 lore raw

PATCH v2 5/5 Add option to specify ramp period by amount of IO

In reply to Jan Kara

In some cases the ramp up period is not easy to define by amount of time. This is for example a case of buffered writes measurement where we want to start measuring only once dirty throttling kicks in. The time until dirty throttling kicks in depends on dirty limit (easy to figure out) and speed of writes to the page cache (difficult to know in advance). Add option ramp_size which determines the ramp up period by the amount of IO written (either by each job or by each group when group reporting is enabled).

---
 HOWTO.rst        | 10 ++++++++
 cconv.c          |  2 ++
 fio.1            |  9 +++++++
 fio_time.h       |  2 +-
 init.c           |  5 ++--
 options.c        | 10 ++++++++
 server.h         |  2 +-
 thread_options.h |  2 ++
 time.c           | 65 +++++++++++++++++++++++++++++++++++++++++++++---
 9 files changed, 100 insertions(+), 7 deletions(-)
HOWTO.rst +10 -0
index 9f55a73bde05..af01f8f626f3 100644
@@ -715,6 +715,16 @@ Time related parameters
 	:option:`runtime` is specified.  When the unit is omitted, the value is
 	given in seconds.
 
+.. option:: ramp_size=size
+
+	If set, fio will wait until the job does given amount of IO before
+	logging any performance numbers. When ``group_reporting`` is enabled,
+	the logging starts when all jobs in the group together perform given
+	amount of IO. Similarly to ``ramp_time`` this is useful for letting
+	performance to settle before logging results and will increase the total
+	runtime if a special timeout or :option:`runtime` is specified. When
+	the unit is omitted, the value is given in bytes.
+
 .. option:: clocksource=str
 
 	Use the given clocksource as the base of timing. The supported options are:
cconv.c +2 -0
index e7bbfc53bc64..0c4a3f2d21e6 100644
@@ -258,6 +258,7 @@ int convert_thread_options_to_cpu(struct thread_options *o,
 	o->start_delay_high = le64_to_cpu(top->start_delay_high);
 	o->timeout = le64_to_cpu(top->timeout);
 	o->ramp_time = le64_to_cpu(top->ramp_time);
+	o->ramp_size = le64_to_cpu(top->ramp_size);
 	o->ss_dur = le64_to_cpu(top->ss_dur);
 	o->ss_ramp_time = le64_to_cpu(top->ss_ramp_time);
 	o->ss_state = le32_to_cpu(top->ss_state);
@@ -636,6 +637,7 @@ void convert_thread_options_to_net(struct thread_options_pack *top,
 	top->start_delay_high = __cpu_to_le64(o->start_delay_high);
 	top->timeout = __cpu_to_le64(o->timeout);
 	top->ramp_time = __cpu_to_le64(o->ramp_time);
+	top->ramp_size = __cpu_to_le64(o->ramp_size);
 	top->ss_dur = __cpu_to_le64(top->ss_dur);
 	top->ss_ramp_time = __cpu_to_le64(top->ss_ramp_time);
 	top->ss_state = cpu_to_le32(top->ss_state);
fio.1 +9 -0
index 9c4ff08c86ad..3ee154ed98f1 100644
@@ -497,6 +497,15 @@ thus it will increase the total runtime if a special timeout or
 \fBruntime\fR is specified. When the unit is omitted, the value is
 given in seconds.
 .TP
+.BI ramp_size \fR=\fPsize
+If set, fio will wait until the job does given amount of IO before
+logging any performance numbers. When \fBgroup_reporting\fR is enabled,
+the logging starts when all jobs in the group together perform given
+amount of IO. Similarly to \fBramp_time\fR this is useful for letting
+performance to settle before logging results and will increase the total
+runtime if a special timeout or \fBruntime\fR is specified. When
+the unit is omitted, the value is given in bytes.
+.TP
 .BI clocksource \fR=\fPstr
 Use the given clocksource as the base of timing. The supported options are:
 .RS
fio_time.h +1 -1
index 54dad8c7812e..ef107c50dc50 100644
@@ -34,7 +34,7 @@ extern void set_genesis_time(void);
 extern int ramp_period_check(void);
 extern bool ramp_period_over(struct thread_data *);
 extern bool in_ramp_period(struct thread_data *);
-extern void td_ramp_period_init(struct thread_data *);
+extern int td_ramp_period_init(struct thread_data *);
 extern void fio_time_init(void);
 extern void timespec_add_msec(struct timespec *, unsigned int);
 extern void set_epoch_time(struct thread_data *, clockid_t, clockid_t);
init.c +3 -2
index 8b7728907c7f..7c5124fc9a6c 100644
@@ -1676,8 +1676,6 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num,
 
 	init_thread_stat_min_vals(&td->ts);
 
-	td_ramp_period_init(td);
-
 	/*
 	 * td->>ddir_seq_nr needs to be initialized to 1, NOT o->ddir_seq_nr,
 	 * so that get_next_offset gets a new random offset the first time it
@@ -1705,6 +1703,9 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num,
 	if (setup_rate(td))
 		goto err;
 
+	if (td_ramp_period_init(td))
+		goto err;
+
 	if (o->write_lat_log) {
 		struct log_params p = {
 			.td = td,
options.c +10 -0
index 8e3de528bbbb..62beb69266f0 100644
@@ -3093,6 +3093,16 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
 		.category = FIO_OPT_C_GENERAL,
 		.group	= FIO_OPT_G_RUNTIME,
 	},
+	{
+		.name	= "ramp_size",
+		.lname	= "Ramp size",
+		.type	= FIO_OPT_STR_VAL,
+		.off1	= offsetof(struct thread_options, ramp_size),
+		.minval = 1,
+		.help	= "Amount of data transferred before measuring performance",
+		.category = FIO_OPT_C_GENERAL,
+		.group	= FIO_OPT_G_RUNTIME,
+	},
 	{
 		.name	= "clocksource",
 		.lname	= "Clock source",
server.h +1 -1
index 139f84b1c319..09e6663e4dde 100644
@@ -51,7 +51,7 @@ struct fio_net_cmd_reply {
 };
 
 enum {
-	FIO_SERVER_VER			= 114,
+	FIO_SERVER_VER			= 116,
 
 	FIO_SERVER_MAX_FRAGMENT_PDU	= 1024,
 	FIO_SERVER_MAX_CMD_MB		= 2048,
thread_options.h +2 -0
index 3abce7318ce2..b4dd8d7acd49 100644
@@ -212,6 +212,7 @@ struct thread_options {
 	unsigned long long start_delay_high;
 	unsigned long long timeout;
 	unsigned long long ramp_time;
+	unsigned long long ramp_size;
 	unsigned int ss_state;
 	fio_fp64_t ss_limit;
 	unsigned long long ss_dur;
@@ -546,6 +547,7 @@ struct thread_options_pack {
 	uint64_t start_delay_high;
 	uint64_t timeout;
 	uint64_t ramp_time;
+	uint64_t ramp_size;
 	uint64_t ss_dur;
 	uint64_t ss_ramp_time;
 	uint32_t ss_state;
time.c +62 -3

87 lines not on this page · raw message

Signature · 1 line
2.51.0
#6 lore raw
In reply to Jan Kara
Quoted 18 lines · Jan Kara

Hello!

In some cases the ramp up period is not easy to define by amount of time. This is for example a case of buffered writes measurement where we want to start measuring only once dirty throttling kicks in. The time until dirty throttling kicks in depends on dirty limit (easy to figure out) and speed of writes to the page cache (difficult to know in advance). This patch series adds to fio an option to specify ramp up period in terms of amount to IO - i.e., the ramp up period finishes once given amount of IO is done.

Changes since v1:
* Improved documentation to explain behavior with group reporting, replace wrong note about default unit being megabytes
* Add sanity checks for inconsistent ramp_size values within reporting group and usage of both ramp_size and ramp_time for a single job.
* Fix fio server support for the new option

Quoted 4 lines

Honza

Previous versions:

I see some evidence that this series lowers reported performance levels.

I measured 13.7-13.9M IOPS before applying this series but 13.5-13.6M IOPS with these patches applied.

https://github.com/vincentkfu/fio has these patches applied.

vincent@meeki:~/fio-dev/fio-canonical$ ./perftest.sh
fio-3.41-65-gd028 **current tip
  read: IOPS=13.7M, BW=52.2GiB/s (56.0GB/s)(522GiB/10000msec)
     issued rwts: total=136806337,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.8M, BW=52.6GiB/s (56.5GB/s)(526GiB/10000msec)
     issued rwts: total=137832044,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.8M, BW=52.6GiB/s (56.5GB/s)(526GiB/10000msec)
     issued rwts: total=138017790,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.8M, BW=52.8GiB/s (56.7GB/s)(528GiB/10000msec)
     issued rwts: total=138339173,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.7M, BW=52.3GiB/s (56.2GB/s)(523GiB/10000msec)
     issued rwts: total=137141350,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.9M, BW=52.9GiB/s (56.8GB/s)(529GiB/10000msec)
     issued rwts: total=138603471,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.8M, BW=52.5GiB/s (56.4GB/s)(525GiB/10000msec)
     issued rwts: total=137722819,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.8M, BW=52.7GiB/s (56.6GB/s)(527GiB/10000msec)
     issued rwts: total=138275811,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.8M, BW=52.5GiB/s (56.4GB/s)(525GiB/10000msec)
     issued rwts: total=137584790,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.8M, BW=52.7GiB/s (56.6GB/s)(527GiB/10000msec)
     issued rwts: total=138181955,0,0,0 short=0,0,0,0 dropped=0,0,0,0

fio-3.41-70-g19ea **with series applied
read: IOPS=13.6M, BW=51.8GiB/s (55.6GB/s)(518GiB/10000msec)

     issued rwts: total=135851169,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.6M, BW=51.7GiB/s (55.6GB/s)(517GiB/10000msec)
     issued rwts: total=135621968,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.6M, BW=51.8GiB/s (55.7GB/s)(518GiB/10000msec)
     issued rwts: total=135896609,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.6M, BW=52.0GiB/s (55.8GB/s)(520GiB/10000msec)
     issued rwts: total=136300772,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.6M, BW=51.9GiB/s (55.8GB/s)(519GiB/10000msec)
     issued rwts: total=136113441,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.5M, BW=51.6GiB/s (55.4GB/s)(516GiB/10000msec)
     issued rwts: total=135364363,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.6M, BW=52.0GiB/s (55.9GB/s)(520GiB/10000msec)
     issued rwts: total=136375631,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.5M, BW=51.5GiB/s (55.3GB/s)(515GiB/10000msec)
     issued rwts: total=135055043,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.5M, BW=51.5GiB/s (55.3GB/s)(515GiB/10000msec)
     issued rwts: total=135058705,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.5M, BW=51.5GiB/s (55.3GB/s)(515GiB/10000msec)
     issued rwts: total=135092086,0,0,0 short=0,0,0,0 dropped=0,0,0,0

This is the script I ran:

--------------------------------------------------
#!/usr/bin/env bash

ITERATIONS=10

echo $(./fio-old --version)
for (( i=0; i<$ITERATIONS; i++ ))
do

    ./fio-old --name=test --ioengine=null --filesize=1T --time_based

--ramp_time=5s --runtime=10s | grep "read:\|rwts"
done

echo
echo $(./fio-new --version)
for (( i=0; i<$ITERATIONS; i++ ))
do

    ./fio-new --name=test --ioengine=null --filesize=1T --time_based

--ramp_time=5s --runtime=10s | grep "read:\|rwts"
done
--------------------------------------------------

Vincent

author
#7 lore raw

Hello!

Quoted 16 lines · Vincent Fu
Quoted 15 lines · Jan Kara

In some cases the ramp up period is not easy to define by amount of time. This is for example a case of buffered writes measurement where we want to start measuring only once dirty throttling kicks in. The time until dirty throttling kicks in depends on dirty limit (easy to figure out) and speed of writes to the page cache (difficult to know in advance). This patch series adds to fio an option to specify ramp up period in terms of amount to IO - i.e., the ramp up period finishes once given amount of IO is done.

Changes since v1:
* Improved documentation to explain behavior with group reporting, replace wrong note about default unit being megabytes
* Add sanity checks for inconsistent ramp_size values within reporting group and usage of both ramp_size and ramp_time for a single job.
* Fix fio server support for the new option

Quoted 6 lines
Quoted 4 lines

Honza

Previous versions:

I see some evidence that this series lowers reported performance levels.

Thanks for reporting. I had a look and on my machine it actually improves reported performance levels:

AVG STDDEV
old 50818766.4 845445.763
new 54965054.6 1113699.088

But IMHO this is mostly just a benchmarking noise due to changes in code alignment wrt caches and possibly data structure alignment as well. Just if I do two compilations of the same sources I get easily a difference in averages ~2 million ops (i.e., ~4%). So at this point I don't think it's really worth it to worry about...

Honza

Quoted 74 lines

I measured 13.7-13.9M IOPS before applying this series but 13.5-13.6M IOPS with these patches applied.

https://github.com/vincentkfu/fio has these patches applied.

vincent@meeki:~/fio-dev/fio-canonical$ ./perftest.sh
fio-3.41-65-gd028 **current tip
  read: IOPS=13.7M, BW=52.2GiB/s (56.0GB/s)(522GiB/10000msec)
     issued rwts: total=136806337,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.8M, BW=52.6GiB/s (56.5GB/s)(526GiB/10000msec)
     issued rwts: total=137832044,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.8M, BW=52.6GiB/s (56.5GB/s)(526GiB/10000msec)
     issued rwts: total=138017790,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.8M, BW=52.8GiB/s (56.7GB/s)(528GiB/10000msec)
     issued rwts: total=138339173,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.7M, BW=52.3GiB/s (56.2GB/s)(523GiB/10000msec)
     issued rwts: total=137141350,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.9M, BW=52.9GiB/s (56.8GB/s)(529GiB/10000msec)
     issued rwts: total=138603471,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.8M, BW=52.5GiB/s (56.4GB/s)(525GiB/10000msec)
     issued rwts: total=137722819,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.8M, BW=52.7GiB/s (56.6GB/s)(527GiB/10000msec)
     issued rwts: total=138275811,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.8M, BW=52.5GiB/s (56.4GB/s)(525GiB/10000msec)
     issued rwts: total=137584790,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.8M, BW=52.7GiB/s (56.6GB/s)(527GiB/10000msec)
     issued rwts: total=138181955,0,0,0 short=0,0,0,0 dropped=0,0,0,0

fio-3.41-70-g19ea **with series applied
read: IOPS=13.6M, BW=51.8GiB/s (55.6GB/s)(518GiB/10000msec)

     issued rwts: total=135851169,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.6M, BW=51.7GiB/s (55.6GB/s)(517GiB/10000msec)
     issued rwts: total=135621968,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.6M, BW=51.8GiB/s (55.7GB/s)(518GiB/10000msec)
     issued rwts: total=135896609,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.6M, BW=52.0GiB/s (55.8GB/s)(520GiB/10000msec)
     issued rwts: total=136300772,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.6M, BW=51.9GiB/s (55.8GB/s)(519GiB/10000msec)
     issued rwts: total=136113441,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.5M, BW=51.6GiB/s (55.4GB/s)(516GiB/10000msec)
     issued rwts: total=135364363,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.6M, BW=52.0GiB/s (55.9GB/s)(520GiB/10000msec)
     issued rwts: total=136375631,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.5M, BW=51.5GiB/s (55.3GB/s)(515GiB/10000msec)
     issued rwts: total=135055043,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.5M, BW=51.5GiB/s (55.3GB/s)(515GiB/10000msec)
     issued rwts: total=135058705,0,0,0 short=0,0,0,0 dropped=0,0,0,0
  read: IOPS=13.5M, BW=51.5GiB/s (55.3GB/s)(515GiB/10000msec)
     issued rwts: total=135092086,0,0,0 short=0,0,0,0 dropped=0,0,0,0

This is the script I ran:

--------------------------------------------------
#!/usr/bin/env bash

ITERATIONS=10

echo $(./fio-old --version)
for (( i=0; i<$ITERATIONS; i++ ))
do

    ./fio-old --name=test --ioengine=null --filesize=1T --time_based

--ramp_time=5s --runtime=10s | grep "read:\|rwts"
done

echo
echo $(./fio-new --version)
for (( i=0; i<$ITERATIONS; i++ ))
do

    ./fio-new --name=test --ioengine=null --filesize=1T --time_based

--ramp_time=5s --runtime=10s | grep "read:\|rwts"
done
--------------------------------------------------

Vincent

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
#8 lore raw
Quoted 10 lines · Jan Kara

<snip>

Thanks for reporting. I had a look and on my machine it actually improves reported performance levels:

AVG STDDEV
old 50818766.4 845445.763
new 54965054.6 1113699.088

Quoted 7 lines

But IMHO this is mostly just a benchmarking noise due to changes in code alignment wrt caches and possibly data structure alignment as well. Just if I do two compilations of the same sources I get easily a difference in averages ~2 million ops (i.e., ~4%). So at this point I don't think it's really worth it to worry about...

Honza

Thanks. I tried on a second system and found no difference. Applied.

Vincent