diff options
author | imtzw <tongzhiwei_yewu@cmss.chinamobile.com> | 2024-07-30 04:02:59 +0200 |
---|---|---|
committer | imtzw <tongzhiwei_yewu@cmss.chinamobile.com> | 2024-07-31 03:05:13 +0200 |
commit | 6e7bc284e63f981c7df123e4d313b2c9dcd6b99d (patch) | |
tree | c3c31f818ba9c2294a54f2a306cfc33fbd580e10 | |
parent | Merge pull request #58205 from NitzanMordhai/wip-nitzan-rados-dashboard-test-... (diff) | |
download | ceph-6e7bc284e63f981c7df123e4d313b2c9dcd6b99d.tar.xz ceph-6e7bc284e63f981c7df123e4d313b2c9dcd6b99d.zip |
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 <tongzhiwei_yewu@cmss.chinamobile.com>
-rw-r--r-- | src/os/bluestore/BlueStore.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 33581d7daba..736d2be8a06 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() |