Bug #7066
closedImproper bench-write implementation in do_bench_write@rbd.cc:924
0%
Description
for (off = 0; off < io_bytes; off += io_size) {
b.wait_for(io_threads - 1);
uint64_t i = 0;
uint64_t real_off = off;
if (pattern == "rand") {
real_off = (rand() % (size / io_size)) * io_size;
}
while (i < io_threads &&
b.start_write(io_threads, real_off, io_size, bl)) {
++i;
++ios;
}
utime_t now = ceph_clock_now(NULL);
utime_t elapsed = now - start;
if (elapsed.sec() != last.sec()) {
printf("%5d %8d %8.2lf %8.2lf\n",
(int)elapsed,
(int)(ios - io_threads),
(double)(ios - io_threads) / elapsed,
(double)(off - io_threads * io_size) / elapsed);
last = elapsed;
}
}
From while loop, we can learn all threads will perform same offset and length write request, it doesn't match the "rand io" pattern.
So in most of "rbd write-bench" results, it seemed not credible. It may get benefits from page cache but it may make all filestore thread blocked by osr->apply_lock(_do_op@os/FileStore). So in practice, the throughout of filestore threads will worser than truth.
Updated by Haomai Wang over 10 years ago
- Subject changed from Inproper bench-write implementation in do_bench_write@rbd.cc:924 to Improper bench-write implementation in do_bench_write@rbd.cc:924
Updated by Josh Durgin over 10 years ago
- Project changed from Ceph to rbd
- Category deleted (
26) - Status changed from 12 to Resolved
- Assignee set to Haomai Wang
- Source changed from other to Community (dev)
commit:fd57d99b6bbd2ec7d5e4c1f4f7cfcf4ba351050b