]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: OSD: better explanation on 'max_count' calculation for 'osd bench'
authorJoao Eduardo Luis <joao.luis@inktank.com>
Wed, 25 Jun 2014 20:20:45 +0000 (21:20 +0100)
committerJoao Eduardo Luis <joao.luis@inktank.com>
Thu, 26 Jun 2014 00:00:36 +0000 (01:00 +0100)
'max_count' is the maximum number of bytes that we are to allow for an
'osd bench' command.  This value is a hard-cap that takes into account
a predefined throughput, the 'osd bench' duration and, for a rather large
block size, can be taken as the amount of bytes that we would ever be
able to write in that period of time.

The explanation wasn't appropriate enough, hence this patch, which
hopefully will avoid confusion in the future.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
src/osd/OSD.cc

index 8974d3aa8763c2700169f7a69878ea92b7548c14..d3b496f69a6c9bada7fd4f1f8338175a75750f80 100644 (file)
@@ -4527,6 +4527,11 @@ void OSD::do_command(Connection *con, ceph_tid_t tid, vector<string>& cmd, buffe
       // However, to avoid the osd from getting hung on this and having
       // timers being triggered, we are going to limit the count assuming
       // a configurable throughput and duration.
+      // NOTE: max_count is the total amount of bytes that we believe we
+      //       will be able to write during 'duration' for the given
+      //       throughput.  The block size hardly impacts this unless it's
+      //       way too big.  Given we already check how big the block size
+      //       is, it's safe to assume everything will check out.
       int64_t max_count =
         g_conf->osd_bench_large_size_max_throughput * duration;
       if (count > max_count) {