OPTION(osd_map_message_max, OPT_INT, 100) // max maps per MOSDMap message
OPTION(osd_map_share_max_epochs, OPT_INT, 100) // cap on # of inc maps we send to peers, clients
OPTION(osd_op_threads, OPT_INT, 2) // 0 == no threading
+OPTION(osd_peering_wq_batch_size, OPT_U64, 20)
OPTION(osd_op_pq_max_tokens_per_priority, OPT_U64, 4194304)
OPTION(osd_op_pq_min_cost, OPT_U64, 65536)
OPTION(osd_disk_threads, OPT_INT, 1)
finished_lock("OSD::finished_lock"),
test_ops_hook(NULL),
op_wq(this, g_conf->osd_op_thread_timeout, &op_tp),
- peering_wq(this, g_conf->osd_op_thread_timeout, &op_tp, 200),
+ peering_wq(this, g_conf->osd_op_thread_timeout, &op_tp),
map_lock("OSD::map_lock"),
peer_map_epoch_lock("OSD::peer_map_epoch_lock"),
debug_drop_pg_create_probability(g_conf->osd_debug_drop_pg_create_probability),
list<PG*> peering_queue;
OSD *osd;
set<PG*> in_use;
- const size_t batch_size;
- PeeringWQ(OSD *o, time_t ti, ThreadPool *tp, size_t batch_size)
+ PeeringWQ(OSD *o, time_t ti, ThreadPool *tp)
: ThreadPool::BatchWorkQueue<PG>(
- "OSD::PeeringWQ", ti, ti*10, tp), osd(o), batch_size(batch_size) {}
+ "OSD::PeeringWQ", ti, ti*10, tp), osd(o) {}
void _dequeue(PG *pg) {
for (list<PG*>::iterator i = peering_queue.begin();
void _dequeue(list<PG*> *out) {
set<PG*> got;
for (list<PG*>::iterator i = peering_queue.begin();
- i != peering_queue.end() && out->size() < batch_size;
+ i != peering_queue.end() &&
+ out->size() < g_conf->osd_peering_wq_batch_size;
) {
if (in_use.count(*i)) {
++i;