b.add_u64(l_bluestore_write_small_new, "bluestore_write_small_new",
"Small write into new (sparse) blob");
+ b.add_u64(l_bluestore_cur_ops_in_queue, "bluestore_cur_ops_in_queue",
+ "Current ops in queue");
+ b.add_u64(l_bluestore_cur_bytes_in_queue, "bluestore_cur_bytes_in_queue",
+ "Current bytes in queue");
+ b.add_u64(l_bluestore_cur_ops_in_wal_queue, "bluestore_cur_ops_in_wal_queue",
+ "Current wal ops in wal queue");
+ b.add_u64(l_bluestore_cur_bytes_in_wal_queue, "l_bluestore_cur_bytes_in_wal_queue",
+ "Current wal bytes in wal queue");
+
b.add_u64(l_bluestore_txc, "bluestore_txc", "Transactions committed");
b.add_u64(l_bluestore_onode_reshard, "bluestore_onode_reshard",
"Onode extent map reshard events");
txc->oncommits.pop_front();
}
- throttle_ops.put(txc->ops);
- throttle_bytes.put(txc->bytes);
+ op_queue_release_throttle(txc);
}
void BlueStore::BSPerfTracker::update_from_perfcounters(
txc->removed_collections.pop_front();
}
- throttle_wal_ops.put(txc->ops);
- throttle_wal_bytes.put(txc->bytes);
+ op_queue_release_wal_throttle(txc);
OpSequencerRef osr = txc->osr;
{
if (handle)
handle->suspend_tp_timeout();
- throttle_ops.get(txc->ops);
- throttle_bytes.get(txc->bytes);
- throttle_wal_ops.get(txc->ops);
- throttle_wal_bytes.get(txc->bytes);
+ op_queue_reserve_throttle(txc);
+ op_queue_reserve_wal_throttle(txc);
if (handle)
handle->reset_tp_timeout();
return 0;
}
+void BlueStore::op_queue_reserve_throttle(TransContext *txc)
+{
+ throttle_ops.get(txc->ops);
+ throttle_bytes.get(txc->bytes);
+
+ logger->set(l_bluestore_cur_ops_in_queue, throttle_ops.get_current());
+ logger->set(l_bluestore_cur_bytes_in_queue, throttle_bytes.get_current());
+}
+
+void BlueStore::op_queue_release_throttle(TransContext *txc)
+{
+ throttle_ops.put(txc->ops);
+ throttle_bytes.put(txc->bytes);
+
+ logger->set(l_bluestore_cur_ops_in_queue, throttle_ops.get_current());
+ logger->set(l_bluestore_cur_bytes_in_queue, throttle_bytes.get_current());
+}
+
+void BlueStore::op_queue_reserve_wal_throttle(TransContext *txc)
+{
+ throttle_wal_ops.get(txc->ops);
+ throttle_wal_bytes.get(txc->bytes);
+
+ logger->set(l_bluestore_cur_ops_in_wal_queue, throttle_wal_ops.get_current());
+ logger->set(l_bluestore_cur_bytes_in_wal_queue, throttle_wal_bytes.get_current());
+}
+
+void BlueStore::op_queue_release_wal_throttle(TransContext *txc)
+{
+ throttle_wal_ops.put(txc->ops);
+ throttle_wal_bytes.put(txc->bytes);
+
+ logger->set(l_bluestore_cur_ops_in_wal_queue, throttle_wal_ops.get_current());
+ logger->set(l_bluestore_cur_bytes_in_wal_queue, throttle_wal_bytes.get_current());
+}
+
void BlueStore::_txc_aio_submit(TransContext *txc)
{
dout(10) << __func__ << " txc " << txc << dendl;
l_bluestore_write_small_wal,
l_bluestore_write_small_pre_read,
l_bluestore_write_small_new,
+
+ l_bluestore_cur_ops_in_queue,
+ l_bluestore_cur_bytes_in_queue,
+ l_bluestore_cur_ops_in_wal_queue,
+ l_bluestore_cur_bytes_in_wal_queue,
+
l_bluestore_txc,
l_bluestore_onode_reshard,
l_bluestore_blob_split,
CollectionRef& d,
unsigned bits, int rem);
+ void op_queue_reserve_throttle(TransContext *txc);
+ void op_queue_release_throttle(TransContext *txc);
+ void op_queue_reserve_wal_throttle(TransContext *txc);
+ void op_queue_release_wal_throttle(TransContext *txc);
};
inline ostream& operator<<(ostream& out, const BlueStore::OpSequencer& s) {