OPTION(osd_debug_drop_pg_create_duration, OPT_INT, 1)
OPTION(osd_op_history_size, OPT_U32, 20) // Max number of completed ops to track
OPTION(osd_op_history_duration, OPT_U32, 600) // Oldest completed op to track
+OPTION(osd_target_transaction_size, OPT_INT, 300) // to adjust various transactions that batch smaller items
OPTION(filestore, OPT_BOOL, false)
OPTION(filestore_debug_omap_check, OPT_BOOL, 0) // Expensive debugging check on sync
// Use omap for xattrs for attrs over
// the previous past_intervals and rebuilding from scratch, or we
// can just do this and commit all our work at the end.
ObjectStore::Transaction t;
+ int num = 0;
for (map<PG*,pistate>::iterator i = pis.begin(); i != pis.end(); ++i) {
PG *pg = i->first;
pg->write_info(t);
+
+ // don't let the transaction get too big
+ if (++num >= g_conf->osd_target_transaction_size) {
+ store->apply_transaction(t);
+ t = ObjectStore::Transaction();
+ num = 0;
+ }
}
- store->apply_transaction(t);
+ if (!t.empty())
+ store->apply_transaction(t);
}