PerfCountersBuilder::PRIO_DEBUGONLY,
unit_t(UNIT_BYTES));
+ b.add_u64_counter(l_bluestore_write_big_skipped_blobs,
+ "write_big_skipped_blobs",
+ "Large aligned writes into fresh blobs skipped due to zero detection (blobs)");
+ b.add_u64_counter(l_bluestore_write_big_skipped_bytes,
+ "write_big_skipped_bytes",
+ "Large aligned writes into fresh blobs skipped due to zero detection (bytes)");
b.add_u64_counter(l_bluestore_write_small_skipped,
"write_small_skipped",
"Small writes into existing or sparse small blobs skipped due to zero detection");
}
bufferlist t;
blp.copy(l, t);
- wctx->write(offset, b, l, b_off, t, b_off, l, false, new_blob);
- dout(20) << __func__ << " schedule write big: 0x"
+
+ // Zero detection -- big block
+ if (!t.is_zero()) {
+ wctx->write(offset, b, l, b_off, t, b_off, l, false, new_blob);
+
+ dout(20) << __func__ << " schedule write big: 0x"
<< std::hex << offset << "~" << l << std::dec
<< (new_blob ? " new " : " reuse ")
<< *b << dendl;
+
+ logger->inc(l_bluestore_write_big_blobs);
+ } else { // if (!t.is_zero())
+ dout(20) << __func__ << " skip big zero block " << std::hex
+ << " (0x" << b_off << "~" << t.length() << ")"
+ << " (0x" << b_off << "~" << l << ")"
+ << std::dec << dendl;
+ logger->inc(l_bluestore_write_big_skipped_blobs);
+ logger->inc(l_bluestore_write_big_skipped_bytes, l);
+ }
+
offset += l;
length -= l;
- logger->inc(l_bluestore_write_big_blobs);
}
}
l_bluestore_submitted_deferred_writes,
l_bluestore_submitted_deferred_write_bytes,
+ l_bluestore_write_big_skipped_blobs,
+ l_bluestore_write_big_skipped_bytes,
l_bluestore_write_small_skipped,
l_bluestore_write_small_skipped_bytes,
//****************************************