Project

General

Profile

Actions

Bug #7066

closed

Improper bench-write implementation in do_bench_write@rbd.cc:924

Added by Haomai Wang over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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.

Actions #1

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
Actions #2

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

Actions

Also available in: Atom PDF