bs=x Thread blocksize is x bytes
bsrange=x-y Mix thread block sizes randomly between x and y
direct=x 1 for direct IO, 0 for buffered IO
- delay=x Delay x useconds before each io
+ thinktime=x "Think" x usec after each io
random IO is randomized
sequential IO is sequential
rate=x Throttle rate to x KiB/sec
unsigned int min_bs;
unsigned int max_bs;
unsigned int odirect;
- unsigned int delay_sleep;
+ unsigned int thinktime;
unsigned int fsync_blocks;
unsigned int start_delay;
unsigned int timeout;
}
}
- if (td->delay_sleep)
- usec_sleep(td->delay_sleep);
-
if (td_read(td))
ret = read(td->fd, io_u->buf, io_u->buflen);
else
if (runtime_exceeded(td, &e))
break;
+ if (td->thinktime)
+ usec_sleep(td->thinktime);
+
put_io_u(td, io_u);
}
if (td->terminate)
break;
- if (td->delay_sleep)
- usec_sleep(td->delay_sleep);
-
io_u = get_io_u(td);
if (!io_u)
break;
gettimeofday(&io_u->issue_time, NULL);
add_slat_sample(td, mtime_since(&io_u->start_time, &io_u->issue_time));
+ if (td->thinktime)
+ usec_sleep(td->thinktime);
if (td->cur_depth < td->aio_depth) {
timeout = &ts;
td->min_bs = def_thread.min_bs;
td->max_bs = def_thread.max_bs;
td->odirect = def_thread.odirect;
- td->delay_sleep = def_thread.delay_sleep;
+ td->thinktime = def_thread.thinktime;
td->fsync_blocks = def_thread.fsync_blocks;
td->start_delay = def_thread.start_delay;
td->timeout = def_thread.timeout;
td->sync_io = 0;
}
- c = strstr(p, "delay=");
+ c = strstr(p, "thinktime=");
if (c) {
- c += 6;
+ c += 10;
fill_option(c, string);
- td->delay_sleep = strtoul(string, NULL, 10);
+ td->thinktime = strtoul(string, NULL, 10);
}
c = strstr(p, "rate=");
fgetpos(f, &off);
continue;
}
- if (!check_int(p, "delay", &td->delay_sleep)) {
+ if (!check_int(p, "thinktime", &td->thinktime)) {
fgetpos(f, &off);
continue;
}