@ -991,31 +991,30 @@ void InternalStats::DumpCFMapStats(
void InternalStats : : DumpCFMapStatsIOStalls (
void InternalStats : : DumpCFMapStatsIOStalls (
std : : map < std : : string , std : : string > * cf_stats ) {
std : : map < std : : string , std : : string > * cf_stats ) {
( * cf_stats ) [ " io_stalls.level0_slowdown " ] =
( * cf_stats ) [ " io_stalls.level0_slowdown " ] =
std : : to_string ( cf_stats_count_ [ LEVEL0_SLOWDOWN_TOTAL ] ) ;
std : : to_string ( cf_stats_count_ [ L0_FILE_COUNT_LIMIT_SLOWDOWNS ] ) ;
( * cf_stats ) [ " io_stalls.level0_slowdown_with_compaction " ] =
( * cf_stats ) [ " io_stalls.level0_slowdown_with_compaction " ] =
std : : to_string ( cf_stats_count_ [ LEVEL0_SLOWDOWN_WITH_COMPACTION ] ) ;
std : : to_string ( cf_stats_count_ [ LOCKED_L0_FILE_COUNT_LIMIT_SLOWDOWNS ] ) ;
( * cf_stats ) [ " io_stalls.level0_numfiles " ] =
( * cf_stats ) [ " io_stalls.level0_numfiles " ] =
std : : to_string ( cf_stats_count_ [ LEVEL0_NUM_FILES_TOTAL ] ) ;
std : : to_string ( cf_stats_count_ [ L0_FILE_COUNT_LIMIT_STOPS ] ) ;
( * cf_stats ) [ " io_stalls.level0_numfiles_with_compaction " ] =
( * cf_stats ) [ " io_stalls.level0_numfiles_with_compaction " ] =
std : : to_string ( cf_stats_count_ [ LEVEL0_NUM_FILES_WITH_COMPACTION ] ) ;
std : : to_string ( cf_stats_count_ [ LOCKED_L0_FILE_COUNT_LIMIT_STOPS ] ) ;
( * cf_stats ) [ " io_stalls.stop_for_pending_compaction_bytes " ] =
( * cf_stats ) [ " io_stalls.stop_for_pending_compaction_bytes " ] =
std : : to_string ( cf_stats_count_ [ HARD_ PENDING_COMPACTION_BYTES_LIMIT] ) ;
std : : to_string ( cf_stats_count_ [ PENDING_COMPACTION_BYTES_LIMIT_STOPS ] ) ;
( * cf_stats ) [ " io_stalls.slowdown_for_pending_compaction_bytes " ] =
( * cf_stats ) [ " io_stalls.slowdown_for_pending_compaction_bytes " ] =
std : : to_string ( cf_stats_count_ [ SOFT_ PENDING_COMPACTION_BYTES_LIMIT] ) ;
std : : to_string ( cf_stats_count_ [ PENDING_COMPACTION_BYTES_LIMIT_SLOWDOWNS ] ) ;
( * cf_stats ) [ " io_stalls.memtable_compaction " ] =
( * cf_stats ) [ " io_stalls.memtable_compaction " ] =
std : : to_string ( cf_stats_count_ [ MEMTABLE_COMPACTION ] ) ;
std : : to_string ( cf_stats_count_ [ MEMTABLE_LIMIT_STOPS ] ) ;
( * cf_stats ) [ " io_stalls.memtable_slowdown " ] =
( * cf_stats ) [ " io_stalls.memtable_slowdown " ] =
std : : to_string ( cf_stats_count_ [ MEMTABLE_SLOWDOWN ] ) ;
std : : to_string ( cf_stats_count_ [ MEMTABLE_LIMIT_ SLOWDOWNS ] ) ;
uint64_t total_stop =
uint64_t total_stop = cf_stats_count_ [ L0_FILE_COUNT_LIMIT_STOPS ] +
cf_stats_count_ [ LEVEL0_NUM_FILES_TOTAL ] +
cf_stats_count_ [ PENDING_COMPACTION_BYTES_LIMIT_STOPS ] +
cf_stats_count_ [ HARD_PENDING_COMPACTION_BYTES_LIMIT ] +
cf_stats_count_ [ MEMTABLE_LIMIT_STOPS ] ;
cf_stats_count_ [ MEMTABLE_COMPACTION ] ;
uint64_t total_slowdown =
uint64_t total_slowdown =
cf_stats_count_ [ LEVEL0_SLOWDOWN_TOTAL ] +
cf_stats_count_ [ L0_FILE_COUNT_LIMIT_SLOWDOWNS ] +
cf_stats_count_ [ SOFT_ PENDING_COMPACTION_BYTES_LIMIT] +
cf_stats_count_ [ PENDING_COMPACTION_BYTES_LIMIT_SLOWDOWNS ] +
cf_stats_count_ [ MEMTABLE_SLOWDOWN ] ;
cf_stats_count_ [ MEMTABLE_LIMIT_ SLOWDOWNS ] ;
( * cf_stats ) [ " io_stalls.total_stop " ] = std : : to_string ( total_stop ) ;
( * cf_stats ) [ " io_stalls.total_stop " ] = std : : to_string ( total_stop ) ;
( * cf_stats ) [ " io_stalls.total_slowdown " ] = std : : to_string ( total_slowdown ) ;
( * cf_stats ) [ " io_stalls.total_slowdown " ] = std : : to_string ( total_slowdown ) ;
@ -1055,11 +1054,12 @@ void InternalStats::DumpCFStatsNoFileHistogram(std::string* value) {
uint64_t ingest_keys_addfile = cf_stats_value_ [ INGESTED_NUM_KEYS_TOTAL ] ;
uint64_t ingest_keys_addfile = cf_stats_value_ [ INGESTED_NUM_KEYS_TOTAL ] ;
// Cumulative summary
// Cumulative summary
uint64_t total_stall_count =
uint64_t total_stall_count =
cf_stats_count_ [ LEVEL0_SLOWDOWN_TOTAL ] +
cf_stats_count_ [ L0_FILE_COUNT_LIMIT_SLOWDOWNS ] +
cf_stats_count_ [ LEVEL0_NUM_FILES_TOTAL ] +
cf_stats_count_ [ L0_FILE_COUNT_LIMIT_STOPS ] +
cf_stats_count_ [ SOFT_PENDING_COMPACTION_BYTES_LIMIT ] +
cf_stats_count_ [ PENDING_COMPACTION_BYTES_LIMIT_SLOWDOWNS ] +
cf_stats_count_ [ HARD_PENDING_COMPACTION_BYTES_LIMIT ] +
cf_stats_count_ [ PENDING_COMPACTION_BYTES_LIMIT_STOPS ] +
cf_stats_count_ [ MEMTABLE_COMPACTION ] + cf_stats_count_ [ MEMTABLE_SLOWDOWN ] ;
cf_stats_count_ [ MEMTABLE_LIMIT_STOPS ] +
cf_stats_count_ [ MEMTABLE_LIMIT_SLOWDOWNS ] ;
// Interval summary
// Interval summary
uint64_t interval_flush_ingest =
uint64_t interval_flush_ingest =
flush_ingest - cf_stats_snapshot_ . ingest_bytes_flush ;
flush_ingest - cf_stats_snapshot_ . ingest_bytes_flush ;
@ -1148,31 +1148,32 @@ void InternalStats::DumpCFStatsNoFileHistogram(std::string* value) {
cf_stats_snapshot_ . compact_bytes_read = compact_bytes_read ;
cf_stats_snapshot_ . compact_bytes_read = compact_bytes_read ;
cf_stats_snapshot_ . compact_micros = compact_micros ;
cf_stats_snapshot_ . compact_micros = compact_micros ;
snprintf ( buf , sizeof ( buf ) , " Stalls(count): % " PRIu64
snprintf ( buf , sizeof ( buf ) ,
" level0_slowdown, "
" Stalls(count): % " PRIu64
" % " PRIu64
" level0_slowdown, "
" level0_slowdown_with_compaction, "
" % " PRIu64
" % " PRIu64
" level0_slowdown_with_compaction, "
" level0_numfiles, "
" % " PRIu64
" % " PRIu64
" level0_numfiles, "
" level0_numfiles_with_compaction, "
" % " PRIu64
" % " PRIu64
" level0_numfiles_with_compaction, "
" stop for pending_compaction_bytes, "
" % " PRIu64
" % " PRIu64
" stop for pending_compaction_bytes, "
" slowdown for pending_compaction_bytes, "
" % " PRIu64
" % " PRIu64
" slowdown for pending_compaction_bytes, "
" memtable_compaction, "
" % " PRIu64
" % " PRIu64
" memtable_compaction, "
" memtable_slowdown, "
" % " PRIu64
" interval % " PRIu64 " total count \n " ,
" memtable_slowdown, "
cf_stats_count_ [ LEVEL0_SLOWDOWN_TOTAL ] ,
" interval % " PRIu64 " total count \n " ,
cf_stats_count_ [ LEVEL0_SLOWDOWN_WITH_COMPACTION ] ,
cf_stats_count_ [ L0_FILE_COUNT_LIMIT_SLOWDOWNS ] ,
cf_stats_count_ [ LEVEL0_NUM_FILES_TOTAL ] ,
cf_stats_count_ [ LOCKED_L0_FILE_COUNT_LIMIT_SLOWDOWNS ] ,
cf_stats_count_ [ LEVEL0_NUM_FILES_WITH_COMPACTION ] ,
cf_stats_count_ [ L0_FILE_COUNT_LIMIT_STOPS ] ,
cf_stats_count_ [ HARD_PENDING_COMPACTION_BYTES_LIMIT ] ,
cf_stats_count_ [ LOCKED_L0_FILE_COUNT_LIMIT_STOPS ] ,
cf_stats_count_ [ SOFT_PENDING_COMPACTION_BYTES_LIMIT ] ,
cf_stats_count_ [ PENDING_COMPACTION_BYTES_LIMIT_STOPS ] ,
cf_stats_count_ [ MEMTABLE_COMPACTION ] ,
cf_stats_count_ [ PENDING_COMPACTION_BYTES_LIMIT_SLOWDOWNS ] ,
cf_stats_count_ [ MEMTABLE_SLOWDOWN ] ,
cf_stats_count_ [ MEMTABLE_LIMIT_STOPS ] ,
cf_stats_count_ [ MEMTABLE_LIMIT_SLOWDOWNS ] ,
total_stall_count - cf_stats_snapshot_ . stall_count ) ;
total_stall_count - cf_stats_snapshot_ . stall_count ) ;
value - > append ( buf ) ;
value - > append ( buf ) ;