Skip to content

Commit 6e7bc28

Browse files
committed
bluestore: record omapiter init latency
if one object has many `internal keys` at its omap beginning, it maybe very slow for the underlying seek to reach the first `user key` when initializing a omapiter. this may stuck osd when build_push_op, seek recovering object's first omap key again and again. Signed-off-by: imtzw <[email protected]>
1 parent 3956c42 commit 6e7bc28

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/os/bluestore/BlueStore.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5472,7 +5472,13 @@ BlueStore::OmapIteratorImpl::OmapIteratorImpl(
54725472
if (o->onode.has_omap()) {
54735473
o->get_omap_key(string(), &head);
54745474
o->get_omap_tail(&tail);
5475+
auto start1 = mono_clock::now();
54755476
it->lower_bound(head);
5477+
c->store->log_latency(
5478+
__func__,
5479+
l_bluestore_omap_seek_to_first_lat,
5480+
mono_clock::now() - start1,
5481+
c->store->cct->_conf->bluestore_log_omap_iterator_age);
54765482
}
54775483
}
54785484
BlueStore::OmapIteratorImpl::~OmapIteratorImpl()

0 commit comments

Comments
 (0)