]> git.apps.os.sepia.ceph.com Git - ceph-ci.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)
committerSage Weil <sage@redhat.com>
Wed, 4 Dec 2019 14:52:15 +0000 (08:52 -0600)
commit4d6c7e349b6749a45ef3ad239113e191b2c1d96a
tree8319b148f57cadf541f04bfea54be2eee1371de3
parent83b2ada9e935ae764be5649acee6ee02e4cb935f
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>
src/common/legacy_config_opts.h
src/common/options.cc
src/mon/Monitor.cc
src/mon/MonitorDBStore.h