diff options
author | Don Anderson <dda@ddanderson.com> | 2014-12-04 09:57:18 -0500 |
---|---|---|
committer | Don Anderson <dda@ddanderson.com> | 2014-12-04 09:57:18 -0500 |
commit | e060906c4fa309f515491fb94b2966aa72b2b5dd (patch) | |
tree | 7a29c7eb0ba130b86925c3be6a848deaff62545c | |
parent | 6bd8e749deb7975cb37f18ae39a43112040aa9be (diff) | |
download | mongo-e060906c4fa309f515491fb94b2966aa72b2b5dd.tar.gz |
Added log compression stats. refs #1359.
-rw-r--r-- | dist/stat_data.py | 4 | ||||
-rw-r--r-- | src/include/stat.h | 8 | ||||
-rw-r--r-- | src/include/wiredtiger.in | 112 | ||||
-rw-r--r-- | src/support/stat.c | 18 |
4 files changed, 78 insertions, 64 deletions
diff --git a/dist/stat_data.py b/dist/stat_data.py index e48f5e7e308..b2b75ced25b 100644 --- a/dist/stat_data.py +++ b/dist/stat_data.py @@ -196,6 +196,10 @@ connection_stats = [ LogStat('log_bytes_payload', 'log bytes of payload data'), LogStat('log_bytes_written', 'log bytes written'), LogStat('log_close_yields', 'yields waiting for previous log file close'), + LogStat('log_compress_len', 'total size of compressed records'), + LogStat('log_compress_mem', 'total in-memory size of compressed records'), + LogStat('log_compress_writes', 'log records compressed'), + LogStat('log_compress_write_fails', 'log records not compressed'), LogStat('log_max_filesize', 'maximum log file size', 'no_clear,no_scale'), LogStat('log_prealloc_files', 'pre-allocated log files prepared'), LogStat('log_prealloc_max', 'number of pre-allocated log files to create'), diff --git a/src/include/stat.h b/src/include/stat.h index de32fb7f33b..cc42ee25d76 100644 --- a/src/include/stat.h +++ b/src/include/stat.h @@ -196,6 +196,10 @@ struct __wt_connection_stats { WT_STATS log_bytes_payload; WT_STATS log_bytes_written; WT_STATS log_close_yields; + WT_STATS log_compress_len; + WT_STATS log_compress_mem; + WT_STATS log_compress_write_fails; + WT_STATS log_compress_writes; WT_STATS log_max_filesize; WT_STATS log_prealloc_files; WT_STATS log_prealloc_max; @@ -320,10 +324,6 @@ struct __wt_dsrc_stats { WT_STATS cursor_search_near; WT_STATS cursor_update; WT_STATS cursor_update_bytes; - WT_STATS log_compress_len; - WT_STATS log_compress_mem; - WT_STATS log_compress_write; - WT_STATS log_compress_write_fail; WT_STATS lsm_checkpoint_throttle; WT_STATS lsm_chunk_count; WT_STATS lsm_generation_max; diff --git a/src/include/wiredtiger.in b/src/include/wiredtiger.in index ba133fd1895..78a386878e6 100644 --- a/src/include/wiredtiger.in +++ b/src/include/wiredtiger.in @@ -3189,110 +3189,118 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection); #define WT_STAT_CONN_LOG_BYTES_WRITTEN 1063 /*! log: yields waiting for previous log file close */ #define WT_STAT_CONN_LOG_CLOSE_YIELDS 1064 +/*! log: total size of compressed records */ +#define WT_STAT_CONN_LOG_COMPRESS_LEN 1065 +/*! log: total in-memory size of compressed records */ +#define WT_STAT_CONN_LOG_COMPRESS_MEM 1066 +/*! log: log records not compressed */ +#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1067 +/*! log: log records compressed */ +#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1068 /*! log: maximum log file size */ -#define WT_STAT_CONN_LOG_MAX_FILESIZE 1065 +#define WT_STAT_CONN_LOG_MAX_FILESIZE 1069 /*! log: pre-allocated log files prepared */ -#define WT_STAT_CONN_LOG_PREALLOC_FILES 1066 +#define WT_STAT_CONN_LOG_PREALLOC_FILES 1070 /*! log: number of pre-allocated log files to create */ -#define WT_STAT_CONN_LOG_PREALLOC_MAX 1067 +#define WT_STAT_CONN_LOG_PREALLOC_MAX 1071 /*! log: pre-allocated log files used */ -#define WT_STAT_CONN_LOG_PREALLOC_USED 1068 +#define WT_STAT_CONN_LOG_PREALLOC_USED 1072 /*! log: log read operations */ -#define WT_STAT_CONN_LOG_READS 1069 +#define WT_STAT_CONN_LOG_READS 1073 /*! log: records processed by log scan */ -#define WT_STAT_CONN_LOG_SCAN_RECORDS 1070 +#define WT_STAT_CONN_LOG_SCAN_RECORDS 1074 /*! log: log scan records requiring two reads */ -#define WT_STAT_CONN_LOG_SCAN_REREADS 1071 +#define WT_STAT_CONN_LOG_SCAN_REREADS 1075 /*! log: log scan operations */ -#define WT_STAT_CONN_LOG_SCANS 1072 +#define WT_STAT_CONN_LOG_SCANS 1076 /*! log: consolidated slot closures */ -#define WT_STAT_CONN_LOG_SLOT_CLOSES 1073 +#define WT_STAT_CONN_LOG_SLOT_CLOSES 1077 /*! log: logging bytes consolidated */ -#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1074 +#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1078 /*! log: consolidated slot joins */ -#define WT_STAT_CONN_LOG_SLOT_JOINS 1075 +#define WT_STAT_CONN_LOG_SLOT_JOINS 1079 /*! log: consolidated slot join races */ -#define WT_STAT_CONN_LOG_SLOT_RACES 1076 +#define WT_STAT_CONN_LOG_SLOT_RACES 1080 /*! log: slots selected for switching that were unavailable */ -#define WT_STAT_CONN_LOG_SLOT_SWITCH_FAILS 1077 +#define WT_STAT_CONN_LOG_SLOT_SWITCH_FAILS 1081 /*! log: record size exceeded maximum */ -#define WT_STAT_CONN_LOG_SLOT_TOOBIG 1078 +#define WT_STAT_CONN_LOG_SLOT_TOOBIG 1082 /*! log: failed to find a slot large enough for record */ -#define WT_STAT_CONN_LOG_SLOT_TOOSMALL 1079 +#define WT_STAT_CONN_LOG_SLOT_TOOSMALL 1083 /*! log: consolidated slot join transitions */ -#define WT_STAT_CONN_LOG_SLOT_TRANSITIONS 1080 +#define WT_STAT_CONN_LOG_SLOT_TRANSITIONS 1084 /*! log: log sync operations */ -#define WT_STAT_CONN_LOG_SYNC 1081 +#define WT_STAT_CONN_LOG_SYNC 1085 /*! log: log write operations */ -#define WT_STAT_CONN_LOG_WRITES 1082 +#define WT_STAT_CONN_LOG_WRITES 1086 /*! LSM: sleep for LSM checkpoint throttle */ -#define WT_STAT_CONN_LSM_CHECKPOINT_THROTTLE 1083 +#define WT_STAT_CONN_LSM_CHECKPOINT_THROTTLE 1087 /*! LSM: sleep for LSM merge throttle */ -#define WT_STAT_CONN_LSM_MERGE_THROTTLE 1084 +#define WT_STAT_CONN_LSM_MERGE_THROTTLE 1088 /*! LSM: rows merged in an LSM tree */ -#define WT_STAT_CONN_LSM_ROWS_MERGED 1085 +#define WT_STAT_CONN_LSM_ROWS_MERGED 1089 /*! LSM: application work units currently queued */ -#define WT_STAT_CONN_LSM_WORK_QUEUE_APP 1086 +#define WT_STAT_CONN_LSM_WORK_QUEUE_APP 1090 /*! LSM: merge work units currently queued */ -#define WT_STAT_CONN_LSM_WORK_QUEUE_MANAGER 1087 +#define WT_STAT_CONN_LSM_WORK_QUEUE_MANAGER 1091 /*! LSM: tree queue hit maximum */ -#define WT_STAT_CONN_LSM_WORK_QUEUE_MAX 1088 +#define WT_STAT_CONN_LSM_WORK_QUEUE_MAX 1092 /*! LSM: switch work units currently queued */ -#define WT_STAT_CONN_LSM_WORK_QUEUE_SWITCH 1089 +#define WT_STAT_CONN_LSM_WORK_QUEUE_SWITCH 1093 /*! LSM: tree maintenance operations scheduled */ -#define WT_STAT_CONN_LSM_WORK_UNITS_CREATED 1090 +#define WT_STAT_CONN_LSM_WORK_UNITS_CREATED 1094 /*! LSM: tree maintenance operations discarded */ -#define WT_STAT_CONN_LSM_WORK_UNITS_DISCARDED 1091 +#define WT_STAT_CONN_LSM_WORK_UNITS_DISCARDED 1095 /*! LSM: tree maintenance operations executed */ -#define WT_STAT_CONN_LSM_WORK_UNITS_DONE 1092 +#define WT_STAT_CONN_LSM_WORK_UNITS_DONE 1096 /*! connection: memory allocations */ -#define WT_STAT_CONN_MEMORY_ALLOCATION 1093 +#define WT_STAT_CONN_MEMORY_ALLOCATION 1097 /*! connection: memory frees */ -#define WT_STAT_CONN_MEMORY_FREE 1094 +#define WT_STAT_CONN_MEMORY_FREE 1098 /*! connection: memory re-allocations */ -#define WT_STAT_CONN_MEMORY_GROW 1095 +#define WT_STAT_CONN_MEMORY_GROW 1099 /*! connection: total read I/Os */ -#define WT_STAT_CONN_READ_IO 1096 +#define WT_STAT_CONN_READ_IO 1100 /*! reconciliation: page reconciliation calls */ -#define WT_STAT_CONN_REC_PAGES 1097 +#define WT_STAT_CONN_REC_PAGES 1101 /*! reconciliation: page reconciliation calls for eviction */ -#define WT_STAT_CONN_REC_PAGES_EVICTION 1098 +#define WT_STAT_CONN_REC_PAGES_EVICTION 1102 /*! reconciliation: split bytes currently awaiting free */ -#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1099 +#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1103 /*! reconciliation: split objects currently awaiting free */ -#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1100 +#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1104 /*! connection: pthread mutex shared lock read-lock calls */ -#define WT_STAT_CONN_RWLOCK_READ 1101 +#define WT_STAT_CONN_RWLOCK_READ 1105 /*! connection: pthread mutex shared lock write-lock calls */ -#define WT_STAT_CONN_RWLOCK_WRITE 1102 +#define WT_STAT_CONN_RWLOCK_WRITE 1106 /*! session: open cursor count */ -#define WT_STAT_CONN_SESSION_CURSOR_OPEN 1103 +#define WT_STAT_CONN_SESSION_CURSOR_OPEN 1107 /*! session: open session count */ -#define WT_STAT_CONN_SESSION_OPEN 1104 +#define WT_STAT_CONN_SESSION_OPEN 1108 /*! transaction: transaction begins */ -#define WT_STAT_CONN_TXN_BEGIN 1105 +#define WT_STAT_CONN_TXN_BEGIN 1109 /*! transaction: transaction checkpoints */ -#define WT_STAT_CONN_TXN_CHECKPOINT 1106 +#define WT_STAT_CONN_TXN_CHECKPOINT 1110 /*! transaction: transaction checkpoint currently running */ -#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1107 +#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1111 /*! transaction: transaction checkpoint max time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1108 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1112 /*! transaction: transaction checkpoint min time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1109 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1113 /*! transaction: transaction checkpoint most recent time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1110 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1114 /*! transaction: transaction checkpoint total time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1111 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1115 /*! transaction: transactions committed */ -#define WT_STAT_CONN_TXN_COMMIT 1112 +#define WT_STAT_CONN_TXN_COMMIT 1116 /*! transaction: transaction failures due to cache overflow */ -#define WT_STAT_CONN_TXN_FAIL_CACHE 1113 +#define WT_STAT_CONN_TXN_FAIL_CACHE 1117 /*! transaction: transaction range of IDs currently pinned */ -#define WT_STAT_CONN_TXN_PINNED_RANGE 1114 +#define WT_STAT_CONN_TXN_PINNED_RANGE 1118 /*! transaction: transactions rolled back */ -#define WT_STAT_CONN_TXN_ROLLBACK 1115 +#define WT_STAT_CONN_TXN_ROLLBACK 1119 /*! connection: total write I/Os */ -#define WT_STAT_CONN_WRITE_IO 1116 +#define WT_STAT_CONN_WRITE_IO 1120 /*! * @} diff --git a/src/support/stat.c b/src/support/stat.c index 2b150cf29f8..0c2cd8bc6d2 100644 --- a/src/support/stat.c +++ b/src/support/stat.c @@ -106,14 +106,6 @@ __wt_stat_init_dsrc_stats(WT_DSRC_STATS *stats) "LSM: sleep for LSM checkpoint throttle"; stats->lsm_merge_throttle.desc = "LSM: sleep for LSM merge throttle"; stats->bloom_size.desc = "LSM: total size of bloom filters"; - stats->log_compress_len.desc = - "logging: total size of compressed records"; - stats->log_compress_mem.desc = - "logging: total in-memory size of compressed records"; - stats->log_compress_write.desc = - "logging: records compressed"; - stats->log_compress_write_fail.desc = - "logging: records not compressed"; stats->rec_dictionary.desc = "reconciliation: dictionary matches"; stats->rec_suffix_compression.desc = "reconciliation: internal page key bytes discarded using suffix compression"; @@ -429,6 +421,9 @@ __wt_stat_init_connection_stats(WT_CONNECTION_STATS *stats) stats->log_bytes_payload.desc = "log: log bytes of payload data"; stats->log_bytes_written.desc = "log: log bytes written"; stats->log_reads.desc = "log: log read operations"; + stats->log_compress_writes.desc = "log: log records compressed"; + stats->log_compress_write_fails.desc = + "log: log records not compressed"; stats->log_scans.desc = "log: log scan operations"; stats->log_scan_rereads.desc = "log: log scan records requiring two reads"; @@ -445,7 +440,10 @@ __wt_stat_init_connection_stats(WT_CONNECTION_STATS *stats) stats->log_scan_records.desc = "log: records processed by log scan"; stats->log_slot_switch_fails.desc = "log: slots selected for switching that were unavailable"; + stats->log_compress_mem.desc = + "log: total in-memory size of compressed records"; stats->log_buffer_size.desc = "log: total log buffer size"; + stats->log_compress_len.desc = "log: total size of compressed records"; stats->log_close_yields.desc = "log: yields waiting for previous log file close"; stats->lsm_work_queue_app.desc = @@ -572,6 +570,8 @@ __wt_stat_refresh_connection_stats(void *stats_arg) stats->log_bytes_payload.v = 0; stats->log_bytes_written.v = 0; stats->log_reads.v = 0; + stats->log_compress_writes.v = 0; + stats->log_compress_write_fails.v = 0; stats->log_scans.v = 0; stats->log_scan_rereads.v = 0; stats->log_sync.v = 0; @@ -583,6 +583,8 @@ __wt_stat_refresh_connection_stats(void *stats_arg) stats->log_slot_toobig.v = 0; stats->log_scan_records.v = 0; stats->log_slot_switch_fails.v = 0; + stats->log_compress_mem.v = 0; + stats->log_compress_len.v = 0; stats->log_close_yields.v = 0; stats->lsm_rows_merged.v = 0; stats->lsm_checkpoint_throttle.v = 0; |