diff options
-rw-r--r-- | dist/api_data.py | 12 | ||||
-rw-r--r-- | dist/stat_data.py | 1 | ||||
-rw-r--r-- | src/config/config_def.c | 29 | ||||
-rw-r--r-- | src/conn/conn_cache.c | 5 | ||||
-rw-r--r-- | src/include/connection.h | 1 | ||||
-rw-r--r-- | src/include/stat.h | 1 | ||||
-rw-r--r-- | src/include/wiredtiger.in | 203 | ||||
-rw-r--r-- | src/support/stat.c | 1 | ||||
-rw-r--r-- | tools/stat_data.py | 2 |
9 files changed, 150 insertions, 105 deletions
diff --git a/dist/api_data.py b/dist/api_data.py index 0141526285c..f0afec41810 100644 --- a/dist/api_data.py +++ b/dist/api_data.py @@ -309,8 +309,18 @@ connection_runtime_config = [ ]), Config('cache_size', '100MB', r''' maximum heap memory to allocate for the cache. A database should - configure either a cache_size or a shared_cache not both''', + configure either \c cache_size or \c shared_cache but not both''', min='1MB', max='10TB'), + Config('cache_overhead', '8', r''' + assume the heap allocator overhead is the specified percentage, and + decrement the cache size by that amount (for example, if the cache + size is 100GB, a percentage of 10 means WiredTiger limits itself to a + cache size of 90GB). This value is configurable because different heap + allocators have different overhead and different workloads will have + different heap allocation sizes and patterns, therefore applications + may need to adjust this value based on allocator choice and behavior + in measured workloads''', + min='0', max='20'), Config('checkpoint', '', r''' periodically checkpoint the database''', type='category', subconfig=[ diff --git a/dist/stat_data.py b/dist/stat_data.py index 69e8d2ed21e..29e62944e9a 100644 --- a/dist/stat_data.py +++ b/dist/stat_data.py @@ -183,6 +183,7 @@ connection_stats = [ CacheStat('cache_eviction_split', 'pages split during eviction'), CacheStat('cache_eviction_walk', 'pages walked for eviction'), CacheStat('cache_inmem_split', 'in-memory page splits'), + CacheStat('cache_overhead', 'percentage overhead', 'no_clear,no_scale'), CacheStat('cache_pages_dirty', 'tracked dirty pages in the cache', 'no_scale'), CacheStat('cache_pages_inuse', diff --git a/src/config/config_def.c b/src/config/config_def.c index ec44e8839b0..6d5a7eef224 100644 --- a/src/config/config_def.c +++ b/src/config/config_def.c @@ -82,6 +82,7 @@ static const WT_CONFIG_CHECK confchk_statistics_log_subconfigs[] = { static const WT_CONFIG_CHECK confchk_connection_reconfigure[] = { { "async", "category", NULL, confchk_async_subconfigs }, + { "cache_overhead", "int", "min=0,max=20", NULL }, { "cache_size", "int", "min=1MB,max=10TB", NULL }, { "checkpoint", "category", NULL, confchk_checkpoint_subconfigs }, @@ -326,6 +327,7 @@ static const WT_CONFIG_CHECK confchk_transaction_sync_subconfigs[] = { static const WT_CONFIG_CHECK confchk_wiredtiger_open[] = { { "async", "category", NULL, confchk_async_subconfigs }, { "buffer_alignment", "int", "min=-1,max=1MB", NULL }, + { "cache_overhead", "int", "min=0,max=20", NULL }, { "cache_size", "int", "min=1MB,max=10TB", NULL }, { "checkpoint", "category", NULL, confchk_checkpoint_subconfigs }, @@ -375,6 +377,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open[] = { static const WT_CONFIG_CHECK confchk_wiredtiger_open_all[] = { { "async", "category", NULL, confchk_async_subconfigs }, { "buffer_alignment", "int", "min=-1,max=1MB", NULL }, + { "cache_overhead", "int", "min=0,max=20", NULL }, { "cache_size", "int", "min=1MB,max=10TB", NULL }, { "checkpoint", "category", NULL, confchk_checkpoint_subconfigs }, @@ -425,6 +428,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_all[] = { static const WT_CONFIG_CHECK confchk_wiredtiger_open_basecfg[] = { { "async", "category", NULL, confchk_async_subconfigs }, { "buffer_alignment", "int", "min=-1,max=1MB", NULL }, + { "cache_overhead", "int", "min=0,max=20", NULL }, { "cache_size", "int", "min=1MB,max=10TB", NULL }, { "checkpoint", "category", NULL, confchk_checkpoint_subconfigs }, @@ -471,6 +475,7 @@ static const WT_CONFIG_CHECK confchk_wiredtiger_open_basecfg[] = { static const WT_CONFIG_CHECK confchk_wiredtiger_open_usercfg[] = { { "async", "category", NULL, confchk_async_subconfigs }, { "buffer_alignment", "int", "min=-1,max=1MB", NULL }, + { "cache_overhead", "int", "min=0,max=20", NULL }, { "cache_size", "int", "min=1MB,max=10TB", NULL }, { "checkpoint", "category", NULL, confchk_checkpoint_subconfigs }, @@ -552,14 +557,14 @@ static const WT_CONFIG_ENTRY config_entries[] = { confchk_connection_open_session }, { "connection.reconfigure", - "async=(enabled=0,ops_max=1024,threads=2),cache_size=100MB," - "checkpoint=(log_size=0,name=\"WiredTigerCheckpoint\",wait=0)," - "error_prefix=,eviction=(threads_max=1,threads_min=1)," - "eviction_dirty_target=80,eviction_target=80,eviction_trigger=95," - "lsm_manager=(merge=,worker_thread_max=4),lsm_merge=," - "shared_cache=(chunk=10MB,name=,reserve=0,size=500MB)," - "statistics=none,statistics_log=(on_close=0," - "path=\"WiredTigerStat.%d.%H\",sources=," + "async=(enabled=0,ops_max=1024,threads=2),cache_overhead=8," + "cache_size=100MB,checkpoint=(log_size=0," + "name=\"WiredTigerCheckpoint\",wait=0),error_prefix=," + "eviction=(threads_max=1,threads_min=1),eviction_dirty_target=80," + "eviction_target=80,eviction_trigger=95,lsm_manager=(merge=," + "worker_thread_max=4),lsm_merge=,shared_cache=(chunk=10MB,name=," + "reserve=0,size=500MB),statistics=none,statistics_log=(on_close=0" + ",path=\"WiredTigerStat.%d.%H\",sources=," "timestamp=\"%b %d %H:%M:%S\",wait=0),verbose=", confchk_connection_reconfigure }, @@ -672,7 +677,7 @@ static const WT_CONFIG_ENTRY config_entries[] = { }, { "wiredtiger_open", "async=(enabled=0,ops_max=1024,threads=2),buffer_alignment=-1," - "cache_size=100MB,checkpoint=(log_size=0," + "cache_overhead=8,cache_size=100MB,checkpoint=(log_size=0," "name=\"WiredTigerCheckpoint\",wait=0),checkpoint_sync=," "config_base=,create=0,direct_io=,error_prefix=," "eviction=(threads_max=1,threads_min=1),eviction_dirty_target=80," @@ -690,7 +695,7 @@ static const WT_CONFIG_ENTRY config_entries[] = { }, { "wiredtiger_open_all", "async=(enabled=0,ops_max=1024,threads=2),buffer_alignment=-1," - "cache_size=100MB,checkpoint=(log_size=0," + "cache_overhead=8,cache_size=100MB,checkpoint=(log_size=0," "name=\"WiredTigerCheckpoint\",wait=0),checkpoint_sync=," "config_base=,create=0,direct_io=,error_prefix=," "eviction=(threads_max=1,threads_min=1),eviction_dirty_target=80," @@ -708,7 +713,7 @@ static const WT_CONFIG_ENTRY config_entries[] = { }, { "wiredtiger_open_basecfg", "async=(enabled=0,ops_max=1024,threads=2),buffer_alignment=-1," - "cache_size=100MB,checkpoint=(log_size=0," + "cache_overhead=8,cache_size=100MB,checkpoint=(log_size=0," "name=\"WiredTigerCheckpoint\",wait=0),checkpoint_sync=," "direct_io=,error_prefix=,eviction=(threads_max=1,threads_min=1)," "eviction_dirty_target=80,eviction_target=80,eviction_trigger=95," @@ -725,7 +730,7 @@ static const WT_CONFIG_ENTRY config_entries[] = { }, { "wiredtiger_open_usercfg", "async=(enabled=0,ops_max=1024,threads=2),buffer_alignment=-1," - "cache_size=100MB,checkpoint=(log_size=0," + "cache_overhead=8,cache_size=100MB,checkpoint=(log_size=0," "name=\"WiredTigerCheckpoint\",wait=0),checkpoint_sync=," "direct_io=,error_prefix=,eviction=(threads_max=1,threads_min=1)," "eviction_dirty_target=80,eviction_target=80,eviction_trigger=95," diff --git a/src/conn/conn_cache.c b/src/conn/conn_cache.c index 91f82a5105b..64530398238 100644 --- a/src/conn/conn_cache.c +++ b/src/conn/conn_cache.c @@ -29,6 +29,10 @@ __wt_cache_config(WT_SESSION_IMPL *session, const char *cfg[]) if (!F_ISSET(conn, WT_CONN_CACHE_POOL)) { WT_RET(__wt_config_gets(session, cfg, "cache_size", &cval)); conn->cache_size = (uint64_t)cval.val; + WT_RET(__wt_config_gets(session, cfg, "cache_overhead", &cval)); + conn->cache_overhead = (int)cval.val; + if (cval.val != 0) + conn->cache_size -= (conn->cache_size * cval.val) / 100; } else { WT_RET(__wt_config_gets( session, cfg, "shared_cache.reserve", &cval)); @@ -142,6 +146,7 @@ __wt_cache_stats_update(WT_SESSION_IMPL *session) WT_STAT_SET(stats, cache_bytes_max, conn->cache_size); WT_STAT_SET(stats, cache_bytes_inuse, __wt_cache_bytes_inuse(cache)); + WT_STAT_SET(stats, cache_overhead, conn->cache_overhead); WT_STAT_SET(stats, cache_pages_inuse, __wt_cache_pages_inuse(cache)); WT_STAT_SET(stats, cache_bytes_dirty, cache->bytes_dirty); WT_STAT_SET(stats, diff --git a/src/include/connection.h b/src/include/connection.h index c5723882489..85ce2e5a675 100644 --- a/src/include/connection.h +++ b/src/include/connection.h @@ -197,6 +197,7 @@ struct __wt_connection_impl { WT_CACHE *cache; /* Page cache */ uint64_t cache_size; + int cache_overhead; WT_TXN_GLOBAL txn_global; /* Global transaction state */ diff --git a/src/include/stat.h b/src/include/stat.h index 6efb9970065..f8c3e43a898 100644 --- a/src/include/stat.h +++ b/src/include/stat.h @@ -177,6 +177,7 @@ struct __wt_connection_stats { WT_STATS cache_eviction_split; WT_STATS cache_eviction_walk; WT_STATS cache_inmem_split; + WT_STATS cache_overhead; WT_STATS cache_pages_dirty; WT_STATS cache_pages_inuse; WT_STATS cache_read; diff --git a/src/include/wiredtiger.in b/src/include/wiredtiger.in index 982e850241b..58ed05965ec 100644 --- a/src/include/wiredtiger.in +++ b/src/include/wiredtiger.in @@ -1537,9 +1537,18 @@ struct __wt_connection { * number of worker threads to service asynchronous requests., an * integer between 1 and 20; default \c 2.} * @config{ ),,} + * @config{cache_overhead, assume the heap allocator overhead is the + * specified percentage\, and decrement the cache size by that amount + * (for example\, if the cache size is 100GB\, a percentage of 10 means + * WiredTiger limits itself to a cache size of 90GB). This value is + * configurable because different heap allocators have different + * allocation overhead\, and no fixed value is correct\, as different + * workloads will have different heap allocation sizes and patterns\, + * and applications may need to adjust this value based on their + * measured workloads., an integer between 0 and 20; default \c 8.} * @config{cache_size, maximum heap memory to allocate for the cache. A - * database should configure either a cache_size or a shared_cache not - * both., an integer between 1MB and 10TB; default \c 100MB.} + * database should configure either \c cache_size or \c shared_cache but + * not both., an integer between 1MB and 10TB; default \c 100MB.} * @config{checkpoint = (, periodically checkpoint the database., a set * of related configuration options defined below.} * @config{ log_size, wait for this amount of log @@ -1864,9 +1873,17 @@ struct __wt_connection { * I/O. The default value of -1 indicates a platform-specific alignment value * should be used (4KB on Linux systems\, zero elsewhere)., an integer between * -1 and 1MB; default \c -1.} + * @config{cache_overhead, assume the heap allocator overhead is the specified + * percentage\, and decrement the cache size by that amount (for example\, if + * the cache size is 100GB\, a percentage of 10 means WiredTiger limits itself + * to a cache size of 90GB). This value is configurable because different heap + * allocators have different allocation overhead\, and no fixed value is + * correct\, as different workloads will have different heap allocation sizes + * and patterns\, and applications may need to adjust this value based on their + * measured workloads., an integer between 0 and 20; default \c 8.} * @config{cache_size, maximum heap memory to allocate for the cache. A - * database should configure either a cache_size or a shared_cache not both., an - * integer between 1MB and 10TB; default \c 100MB.} + * database should configure either \c cache_size or \c shared_cache but not + * both., an integer between 1MB and 10TB; default \c 100MB.} * @config{checkpoint = (, periodically checkpoint the database., a set of * related configuration options defined below.} * @config{ log_size, wait for this amount of log record @@ -3227,182 +3244,184 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection); #define WT_STAT_CONN_CACHE_EVICTION_WALK 1043 /*! cache: in-memory page splits */ #define WT_STAT_CONN_CACHE_INMEM_SPLIT 1044 +/*! cache: percentage overhead */ +#define WT_STAT_CONN_CACHE_OVERHEAD 1045 /*! cache: tracked dirty pages in the cache */ -#define WT_STAT_CONN_CACHE_PAGES_DIRTY 1045 +#define WT_STAT_CONN_CACHE_PAGES_DIRTY 1046 /*! cache: pages currently held in the cache */ -#define WT_STAT_CONN_CACHE_PAGES_INUSE 1046 +#define WT_STAT_CONN_CACHE_PAGES_INUSE 1047 /*! cache: pages read into cache */ -#define WT_STAT_CONN_CACHE_READ 1047 +#define WT_STAT_CONN_CACHE_READ 1048 /*! cache: pages written from cache */ -#define WT_STAT_CONN_CACHE_WRITE 1048 +#define WT_STAT_CONN_CACHE_WRITE 1049 /*! connection: pthread mutex condition wait calls */ -#define WT_STAT_CONN_COND_WAIT 1049 +#define WT_STAT_CONN_COND_WAIT 1050 /*! cursor: cursor create calls */ -#define WT_STAT_CONN_CURSOR_CREATE 1050 +#define WT_STAT_CONN_CURSOR_CREATE 1051 /*! cursor: cursor insert calls */ -#define WT_STAT_CONN_CURSOR_INSERT 1051 +#define WT_STAT_CONN_CURSOR_INSERT 1052 /*! cursor: cursor next calls */ -#define WT_STAT_CONN_CURSOR_NEXT 1052 +#define WT_STAT_CONN_CURSOR_NEXT 1053 /*! cursor: cursor prev calls */ -#define WT_STAT_CONN_CURSOR_PREV 1053 +#define WT_STAT_CONN_CURSOR_PREV 1054 /*! cursor: cursor remove calls */ -#define WT_STAT_CONN_CURSOR_REMOVE 1054 +#define WT_STAT_CONN_CURSOR_REMOVE 1055 /*! cursor: cursor reset calls */ -#define WT_STAT_CONN_CURSOR_RESET 1055 +#define WT_STAT_CONN_CURSOR_RESET 1056 /*! cursor: cursor search calls */ -#define WT_STAT_CONN_CURSOR_SEARCH 1056 +#define WT_STAT_CONN_CURSOR_SEARCH 1057 /*! cursor: cursor search near calls */ -#define WT_STAT_CONN_CURSOR_SEARCH_NEAR 1057 +#define WT_STAT_CONN_CURSOR_SEARCH_NEAR 1058 /*! cursor: cursor update calls */ -#define WT_STAT_CONN_CURSOR_UPDATE 1058 +#define WT_STAT_CONN_CURSOR_UPDATE 1059 /*! data-handle: connection dhandles swept */ -#define WT_STAT_CONN_DH_CONN_HANDLES 1059 +#define WT_STAT_CONN_DH_CONN_HANDLES 1060 /*! data-handle: connection candidate referenced */ -#define WT_STAT_CONN_DH_CONN_REF 1060 +#define WT_STAT_CONN_DH_CONN_REF 1061 /*! data-handle: connection sweeps */ -#define WT_STAT_CONN_DH_CONN_SWEEPS 1061 +#define WT_STAT_CONN_DH_CONN_SWEEPS 1062 /*! data-handle: connection time-of-death sets */ -#define WT_STAT_CONN_DH_CONN_TOD 1062 +#define WT_STAT_CONN_DH_CONN_TOD 1063 /*! data-handle: session dhandles swept */ -#define WT_STAT_CONN_DH_SESSION_HANDLES 1063 +#define WT_STAT_CONN_DH_SESSION_HANDLES 1064 /*! data-handle: session sweep attempts */ -#define WT_STAT_CONN_DH_SESSION_SWEEPS 1064 +#define WT_STAT_CONN_DH_SESSION_SWEEPS 1065 /*! connection: files currently open */ -#define WT_STAT_CONN_FILE_OPEN 1065 +#define WT_STAT_CONN_FILE_OPEN 1066 /*! log: log buffer size increases */ -#define WT_STAT_CONN_LOG_BUFFER_GROW 1066 +#define WT_STAT_CONN_LOG_BUFFER_GROW 1067 /*! log: total log buffer size */ -#define WT_STAT_CONN_LOG_BUFFER_SIZE 1067 +#define WT_STAT_CONN_LOG_BUFFER_SIZE 1068 /*! log: log bytes of payload data */ -#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1068 +#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1069 /*! log: log bytes written */ -#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1069 +#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1070 /*! log: yields waiting for previous log file close */ -#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1070 +#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1071 /*! log: total size of compressed records */ -#define WT_STAT_CONN_LOG_COMPRESS_LEN 1071 +#define WT_STAT_CONN_LOG_COMPRESS_LEN 1072 /*! log: total in-memory size of compressed records */ -#define WT_STAT_CONN_LOG_COMPRESS_MEM 1072 +#define WT_STAT_CONN_LOG_COMPRESS_MEM 1073 /*! log: log records too small to compress */ -#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1073 +#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1074 /*! log: log records not compressed */ -#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1074 +#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1075 /*! log: log records compressed */ -#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1075 +#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1076 /*! log: maximum log file size */ -#define WT_STAT_CONN_LOG_MAX_FILESIZE 1076 +#define WT_STAT_CONN_LOG_MAX_FILESIZE 1077 /*! log: pre-allocated log files prepared */ -#define WT_STAT_CONN_LOG_PREALLOC_FILES 1077 +#define WT_STAT_CONN_LOG_PREALLOC_FILES 1078 /*! log: number of pre-allocated log files to create */ -#define WT_STAT_CONN_LOG_PREALLOC_MAX 1078 +#define WT_STAT_CONN_LOG_PREALLOC_MAX 1079 /*! log: pre-allocated log files used */ -#define WT_STAT_CONN_LOG_PREALLOC_USED 1079 +#define WT_STAT_CONN_LOG_PREALLOC_USED 1080 /*! log: log read operations */ -#define WT_STAT_CONN_LOG_READS 1080 +#define WT_STAT_CONN_LOG_READS 1081 /*! log: records processed by log scan */ -#define WT_STAT_CONN_LOG_SCAN_RECORDS 1081 +#define WT_STAT_CONN_LOG_SCAN_RECORDS 1082 /*! log: log scan records requiring two reads */ -#define WT_STAT_CONN_LOG_SCAN_REREADS 1082 +#define WT_STAT_CONN_LOG_SCAN_REREADS 1083 /*! log: log scan operations */ -#define WT_STAT_CONN_LOG_SCANS 1083 +#define WT_STAT_CONN_LOG_SCANS 1084 /*! log: consolidated slot closures */ -#define WT_STAT_CONN_LOG_SLOT_CLOSES 1084 +#define WT_STAT_CONN_LOG_SLOT_CLOSES 1085 /*! log: logging bytes consolidated */ -#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1085 +#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1086 /*! log: consolidated slot joins */ -#define WT_STAT_CONN_LOG_SLOT_JOINS 1086 +#define WT_STAT_CONN_LOG_SLOT_JOINS 1087 /*! log: consolidated slot join races */ -#define WT_STAT_CONN_LOG_SLOT_RACES 1087 +#define WT_STAT_CONN_LOG_SLOT_RACES 1088 /*! log: slots selected for switching that were unavailable */ -#define WT_STAT_CONN_LOG_SLOT_SWITCH_FAILS 1088 +#define WT_STAT_CONN_LOG_SLOT_SWITCH_FAILS 1089 /*! log: record size exceeded maximum */ -#define WT_STAT_CONN_LOG_SLOT_TOOBIG 1089 +#define WT_STAT_CONN_LOG_SLOT_TOOBIG 1090 /*! log: failed to find a slot large enough for record */ -#define WT_STAT_CONN_LOG_SLOT_TOOSMALL 1090 +#define WT_STAT_CONN_LOG_SLOT_TOOSMALL 1091 /*! log: consolidated slot join transitions */ -#define WT_STAT_CONN_LOG_SLOT_TRANSITIONS 1091 +#define WT_STAT_CONN_LOG_SLOT_TRANSITIONS 1092 /*! log: log sync operations */ -#define WT_STAT_CONN_LOG_SYNC 1092 +#define WT_STAT_CONN_LOG_SYNC 1093 /*! log: log write operations */ -#define WT_STAT_CONN_LOG_WRITES 1093 +#define WT_STAT_CONN_LOG_WRITES 1094 /*! LSM: sleep for LSM checkpoint throttle */ -#define WT_STAT_CONN_LSM_CHECKPOINT_THROTTLE 1094 +#define WT_STAT_CONN_LSM_CHECKPOINT_THROTTLE 1095 /*! LSM: sleep for LSM merge throttle */ -#define WT_STAT_CONN_LSM_MERGE_THROTTLE 1095 +#define WT_STAT_CONN_LSM_MERGE_THROTTLE 1096 /*! LSM: rows merged in an LSM tree */ -#define WT_STAT_CONN_LSM_ROWS_MERGED 1096 +#define WT_STAT_CONN_LSM_ROWS_MERGED 1097 /*! LSM: application work units currently queued */ -#define WT_STAT_CONN_LSM_WORK_QUEUE_APP 1097 +#define WT_STAT_CONN_LSM_WORK_QUEUE_APP 1098 /*! LSM: merge work units currently queued */ -#define WT_STAT_CONN_LSM_WORK_QUEUE_MANAGER 1098 +#define WT_STAT_CONN_LSM_WORK_QUEUE_MANAGER 1099 /*! LSM: tree queue hit maximum */ -#define WT_STAT_CONN_LSM_WORK_QUEUE_MAX 1099 +#define WT_STAT_CONN_LSM_WORK_QUEUE_MAX 1100 /*! LSM: switch work units currently queued */ -#define WT_STAT_CONN_LSM_WORK_QUEUE_SWITCH 1100 +#define WT_STAT_CONN_LSM_WORK_QUEUE_SWITCH 1101 /*! LSM: tree maintenance operations scheduled */ -#define WT_STAT_CONN_LSM_WORK_UNITS_CREATED 1101 +#define WT_STAT_CONN_LSM_WORK_UNITS_CREATED 1102 /*! LSM: tree maintenance operations discarded */ -#define WT_STAT_CONN_LSM_WORK_UNITS_DISCARDED 1102 +#define WT_STAT_CONN_LSM_WORK_UNITS_DISCARDED 1103 /*! LSM: tree maintenance operations executed */ -#define WT_STAT_CONN_LSM_WORK_UNITS_DONE 1103 +#define WT_STAT_CONN_LSM_WORK_UNITS_DONE 1104 /*! connection: memory allocations */ -#define WT_STAT_CONN_MEMORY_ALLOCATION 1104 +#define WT_STAT_CONN_MEMORY_ALLOCATION 1105 /*! connection: memory frees */ -#define WT_STAT_CONN_MEMORY_FREE 1105 +#define WT_STAT_CONN_MEMORY_FREE 1106 /*! connection: memory re-allocations */ -#define WT_STAT_CONN_MEMORY_GROW 1106 +#define WT_STAT_CONN_MEMORY_GROW 1107 /*! thread-yield: page acquire busy blocked */ -#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1107 +#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1108 /*! thread-yield: page acquire eviction blocked */ -#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1108 +#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1109 /*! thread-yield: page acquire locked blocked */ -#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1109 +#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1110 /*! thread-yield: page acquire read blocked */ -#define WT_STAT_CONN_PAGE_READ_BLOCKED 1110 +#define WT_STAT_CONN_PAGE_READ_BLOCKED 1111 /*! thread-yield: page acquire time sleeping (usecs) */ -#define WT_STAT_CONN_PAGE_SLEEP 1111 +#define WT_STAT_CONN_PAGE_SLEEP 1112 /*! connection: total read I/Os */ -#define WT_STAT_CONN_READ_IO 1112 +#define WT_STAT_CONN_READ_IO 1113 /*! reconciliation: page reconciliation calls */ -#define WT_STAT_CONN_REC_PAGES 1113 +#define WT_STAT_CONN_REC_PAGES 1114 /*! reconciliation: page reconciliation calls for eviction */ -#define WT_STAT_CONN_REC_PAGES_EVICTION 1114 +#define WT_STAT_CONN_REC_PAGES_EVICTION 1115 /*! reconciliation: split bytes currently awaiting free */ -#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1115 +#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1116 /*! reconciliation: split objects currently awaiting free */ -#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1116 +#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1117 /*! connection: pthread mutex shared lock read-lock calls */ -#define WT_STAT_CONN_RWLOCK_READ 1117 +#define WT_STAT_CONN_RWLOCK_READ 1118 /*! connection: pthread mutex shared lock write-lock calls */ -#define WT_STAT_CONN_RWLOCK_WRITE 1118 +#define WT_STAT_CONN_RWLOCK_WRITE 1119 /*! session: open cursor count */ -#define WT_STAT_CONN_SESSION_CURSOR_OPEN 1119 +#define WT_STAT_CONN_SESSION_CURSOR_OPEN 1120 /*! session: open session count */ -#define WT_STAT_CONN_SESSION_OPEN 1120 +#define WT_STAT_CONN_SESSION_OPEN 1121 /*! transaction: transaction begins */ -#define WT_STAT_CONN_TXN_BEGIN 1121 +#define WT_STAT_CONN_TXN_BEGIN 1122 /*! transaction: transaction checkpoints */ -#define WT_STAT_CONN_TXN_CHECKPOINT 1122 +#define WT_STAT_CONN_TXN_CHECKPOINT 1123 /*! transaction: transaction checkpoint currently running */ -#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1123 +#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1124 /*! transaction: transaction checkpoint max time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1124 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1125 /*! transaction: transaction checkpoint min time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1125 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1126 /*! transaction: transaction checkpoint most recent time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1126 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1127 /*! transaction: transaction checkpoint total time (msecs) */ -#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1127 +#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1128 /*! transaction: transactions committed */ -#define WT_STAT_CONN_TXN_COMMIT 1128 +#define WT_STAT_CONN_TXN_COMMIT 1129 /*! transaction: transaction failures due to cache overflow */ -#define WT_STAT_CONN_TXN_FAIL_CACHE 1129 +#define WT_STAT_CONN_TXN_FAIL_CACHE 1130 /*! transaction: transaction range of IDs currently pinned */ -#define WT_STAT_CONN_TXN_PINNED_RANGE 1130 +#define WT_STAT_CONN_TXN_PINNED_RANGE 1131 /*! transaction: transactions rolled back */ -#define WT_STAT_CONN_TXN_ROLLBACK 1131 +#define WT_STAT_CONN_TXN_ROLLBACK 1132 /*! connection: total write I/Os */ -#define WT_STAT_CONN_WRITE_IO 1132 +#define WT_STAT_CONN_WRITE_IO 1133 /*! * @} diff --git a/src/support/stat.c b/src/support/stat.c index 223d62d0559..c1de6bdd9ce 100644 --- a/src/support/stat.c +++ b/src/support/stat.c @@ -387,6 +387,7 @@ __wt_stat_init_connection_stats(WT_CONNECTION_STATS *stats) "cache: pages split during eviction"; stats->cache_eviction_walk.desc = "cache: pages walked for eviction"; stats->cache_write.desc = "cache: pages written from cache"; + stats->cache_overhead.desc = "cache: percentage overhead"; stats->cache_bytes_dirty.desc = "cache: tracked dirty bytes in the cache"; stats->cache_pages_dirty.desc = diff --git a/tools/stat_data.py b/tools/stat_data.py index 89e06dbbf90..da6fb3a7f7f 100644 --- a/tools/stat_data.py +++ b/tools/stat_data.py @@ -6,6 +6,7 @@ no_scale_per_second_list = [ 'cache: maximum bytes configured', 'cache: maximum page size at eviction', 'cache: pages currently held in the cache', + 'cache: percentage overhead', 'cache: tracked dirty bytes in the cache', 'cache: tracked dirty pages in the cache', 'connection: files currently open', @@ -57,6 +58,7 @@ no_clear_list = [ 'cache: bytes currently in the cache', 'cache: maximum bytes configured', 'cache: pages currently held in the cache', + 'cache: percentage overhead', 'connection: files currently open', 'log: maximum log file size', 'log: total log buffer size', |