]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: avoid waking up kv thread on deferred write completion
authorSage Weil <sage@redhat.com>
Thu, 9 Mar 2017 16:53:06 +0000 (11:53 -0500)
committerSage Weil <sage@redhat.com>
Tue, 21 Mar 2017 18:56:28 +0000 (13:56 -0500)
commitd3a425faf88db8f14eaa825fc1a3ea87b7e3ac5d
treebeef45e67b475b91e73337db40089ccf1ea23e4d
parent78b9cea09f21ee26680ea91fd3bf296acd5a5787
os/bluestore: avoid waking up kv thread on deferred write completion

In a simple HDD workload with queue depth of 1, we halve our throughput
because the kv thread does a full commit twice per IO: once for the
initial commit, and then again to clean up the deferred write record. The
second wakeup is unnecessary; we can clean it up on the next commit.

We do need to do this wakeup in a few cases, though, when draining the
OpSequencers: (1) on replay during startup, and (2) on shutdown in
_osr_drain_all().

Send everything through _osr_drain_all() for simplicity.

This doubles HDD qd=1 IOPS from ~50 to ~100 on my 7200 rpm test device
(rados bench 30 write -b 4096 -t 1).

Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h