With a prediction of expected per pg maximum ops to initialize the number of hash bucket
Signed-off-by: Ning Yao <zay11022@gmail.com>
OPTION(osd_max_pgls, OPT_U64, 1024) // max number of pgls entries to return
OPTION(osd_client_message_size_cap, OPT_U64, 500*1024L*1024L) // client data allowed in-memory (in bytes)
OPTION(osd_client_message_cap, OPT_U64, 100) // num client messages allowed in-memory
+OPTION(osd_pg_op_threshold_ratio, OPT_U64, 2) // the expected maximum op over the average number of ops per pg
OPTION(osd_pg_bits, OPT_INT, 6) // bits per osd
OPTION(osd_pgp_bits, OPT_INT, 6) // bits per osd
OPTION(osd_crush_chooseleaf_type, OPT_INT, 1) // 1 = host
pgbackend->get_is_readable_predicate(),
pgbackend->get_is_recoverable_predicate());
snap_trimmer_machine.initiate();
+ repop_map.rehash(g_conf->osd_client_message_cap/_pool.info.get_pg_num() * g_conf->osd_pg_op_threshold_ratio);
}
void ReplicatedPG::get_src_oloc(const object_t& oid, const object_locator_t& oloc, object_locator_t& src_oloc)
#include <boost/tuple/tuple.hpp>
#include "include/assert.h"
+#include "include/unordered_map.h"
#include "common/cmdparse.h"
#include "HitSet.h"
// replica ops
// [primary|tail]
xlist<RepGather*> repop_queue;
- map<ceph_tid_t, RepGather*> repop_map;
+ ceph::unordered_map<ceph_tid_t, RepGather*> repop_map;
friend class C_OSD_RepopApplied;
friend class C_OSD_RepopCommit;