OPTION(osd_command_max_records, OPT_INT, 256)
OPTION(osd_op_log_threshold, OPT_INT, 5) // how many op log messages to show in one go
OPTION(osd_verify_sparse_read_holes, OPT_BOOL, false) // read fiemap-reported holes and verify they are zeros
+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);
}