diff options
author | Adam C. Emerson <aemerson@redhat.com> | 2022-10-11 20:49:58 +0200 |
---|---|---|
committer | Adam C. Emerson <aemerson@redhat.com> | 2023-01-13 00:13:46 +0100 |
commit | b5d5da9c4d2a7bb07bdc6b51b9f58831d220d99b (patch) | |
tree | fe413929201d6929fef90d33db38ba08754ca6e0 /src/rgw/driver/rados/rgw_cr_rados.cc | |
parent | rgw: `SimpleRadosWriteAttrsCR` uses an async RADOS call (diff) | |
download | ceph-b5d5da9c4d2a7bb07bdc6b51b9f58831d220d99b.tar.xz ceph-b5d5da9c4d2a7bb07bdc6b51b9f58831d220d99b.zip |
rgw: Reduce data sync parallelism in response to RADOS lock latency
Lock latency in RGWContinuousLeaseCR gets high enough under load that
the locks end up timing out, leading to incorrect behavior.
Monitor lock latency and cut concurrent operations in half if it goes
above ten seconds.
Cut currency to one if it goes about twenty seconds.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Diffstat (limited to 'src/rgw/driver/rados/rgw_cr_rados.cc')
-rw-r--r-- | src/rgw/driver/rados/rgw_cr_rados.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rgw/driver/rados/rgw_cr_rados.cc b/src/rgw/driver/rados/rgw_cr_rados.cc index eb5db86f25a..7d9f3957dcb 100644 --- a/src/rgw/driver/rados/rgw_cr_rados.cc +++ b/src/rgw/driver/rados/rgw_cr_rados.cc @@ -937,7 +937,11 @@ int RGWContinuousLeaseCR::operate(const DoutPrefixProvider *dpp) reenter(this) { last_renew_try_time = ceph::coarse_mono_clock::now(); while (!going_down) { + current_time = ceph::coarse_mono_clock::now(); yield call(new RGWSimpleRadosLockCR(async_rados, store, obj, lock_name, cookie, interval)); + if (latency) { + latency->add_latency(ceph::coarse_mono_clock::now() - current_time); + } current_time = ceph::coarse_mono_clock::now(); if (current_time - last_renew_try_time > interval_tolerance) { // renewal should happen between 50%-90% of interval @@ -957,7 +961,11 @@ int RGWContinuousLeaseCR::operate(const DoutPrefixProvider *dpp) yield wait(utime_t(interval / 2, 0)); } set_locked(false); /* moot at this point anyway */ + current_time = ceph::coarse_mono_clock::now(); yield call(new RGWSimpleRadosUnlockCR(async_rados, store, obj, lock_name, cookie)); + if (latency) { + latency->add_latency(ceph::coarse_mono_clock::now() - current_time); + } return set_state(RGWCoroutine_Done); } return 0; |