From: imtzw Date: Tue, 30 Jul 2024 02:02:59 +0000 (+0000) Subject: bluestore: record omapiter init latency X-Git-Tag: v20.0.0~409^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6e7bc284e63f981c7df123e4d313b2c9dcd6b99d;p=ceph.git 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 --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 33581d7dabaf..736d2be8a064 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -5472,7 +5472,13 @@ BlueStore::OmapIteratorImpl::OmapIteratorImpl( if (o->onode.has_omap()) { o->get_omap_key(string(), &head); o->get_omap_tail(&tail); + auto start1 = mono_clock::now(); it->lower_bound(head); + c->store->log_latency( + __func__, + l_bluestore_omap_seek_to_first_lat, + mono_clock::now() - start1, + c->store->cct->_conf->bluestore_log_omap_iterator_age); } } BlueStore::OmapIteratorImpl::~OmapIteratorImpl()