Add ramp_time option
Sometimes it's useful to let a job settle for a little while
before taking any measurements on latency and throughput, since
the initial rate on eg a write workload may be much higher than
the longer sustained rate.
So add a ramp_time option that allows the user to specify a lead
ramp time that must have passed before fio takes any performance
numbers into account.
Suggested by "Jenkins, Lee" <Lee.Jenkins@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/fio.c b/fio.c
index ee752e1..2a09fbe 100644
--- a/fio.c
+++ b/fio.c
@@ -619,15 +619,17 @@
* of completions except the very first one which may look
* a little bursty
*/
- usec = utime_since(&s, &comp_time);
+ if (ramp_time_over(td)) {
+ usec = utime_since(&s, &comp_time);
- rate_throttle(td, usec, bytes_done);
+ rate_throttle(td, usec, bytes_done);
- if (check_min_rate(td, &comp_time)) {
- if (exitall_on_terminate)
- terminate_threads(td->groupid);
- td_verror(td, EIO, "check_min_rate");
- break;
+ if (check_min_rate(td, &comp_time)) {
+ if (exitall_on_terminate)
+ terminate_threads(td->groupid);
+ td_verror(td, EIO, "check_min_rate");
+ break;
+ }
}
if (td->o.thinktime) {