]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon: cap keys in mon_sync messages
authorSage Weil <sage@redhat.com>
Mon, 2 Dec 2019 13:43:54 +0000 (07:43 -0600)
committerDan van der Ster <daniel.vanderster@cern.ch>
Thu, 5 Mar 2020 20:10:52 +0000 (21:10 +0100)
commitd6037b7f484e13cfc9136e63e4cf7fac6ad68960
treea534265d9192e94d365b195a8ae2763317f123ab
parent4c54cb8ad0cd62a9da7a12bb07a7455b183dbbb0
mon: cap keys in mon_sync messages

The previous cap was set at 1 MB.  However, a user was experiencing mon
timeouts while syncing the purged_snap_epoch * keys, which are ~20 bytes
each.  Reducing the max payload to 64K resolved the problem, which maps
to (very!) roughly 1500 keys per message.  Set our limit a bit higher than
that since we just made this quite a bit more efficient.  Most of the time
the keys are larger than 20 bytes and we wouldn't hit the key limit, but
having one ensures that we won't burn too much CPU in one go when we do
have lots of these little keys.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 4d6c7e349b6749a45ef3ad239113e191b2c1d96a)
src/common/legacy_config_opts.h
src/common/options.cc
src/mon/Monitor.cc
src/mon/MonitorDBStore.h