summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2016-06-23 17:29:40 +1000
committerGitHub <noreply@github.com>2016-06-23 17:29:40 +1000
commit1f4aaa4490a82cf947afdabbb9214ee5b1850d13 (patch)
tree6f03ed5cde97aedc762215c14d23ee5305998a2b /src
parentf01b76051e4efe69e7f9e6443c9404ec4d8418cc (diff)
downloadmongo-1f4aaa4490a82cf947afdabbb9214ee5b1850d13.tar.gz
SERVER-24580 Add more eviction stats to track efficiency. (#2830)
Diffstat (limited to 'src')
-rw-r--r--src/conn/conn_cache.c8
-rw-r--r--src/evict/evict_lru.c30
-rw-r--r--src/include/stat.h6
-rw-r--r--src/include/wiredtiger.in290
-rw-r--r--src/support/stat.c24
5 files changed, 211 insertions, 147 deletions
diff --git a/src/conn/conn_cache.c b/src/conn/conn_cache.c
index 564603eccc9..9f15db5382b 100644
--- a/src/conn/conn_cache.c
+++ b/src/conn/conn_cache.c
@@ -228,6 +228,14 @@ __wt_cache_stats_update(WT_SESSION_IMPL *session)
WT_STAT_SET(
session, stats, cache_bytes_overflow, cache->bytes_overflow);
WT_STAT_SET(session, stats, cache_bytes_leaf, leaf);
+
+ /*
+ * The number of files with active walks ~= number of hazard pointers
+ * in the walk session. Note: reading without locking.
+ */
+ if (conn->evict_session != NULL)
+ WT_STAT_SET(session, stats, cache_eviction_walks_active,
+ conn->evict_session->nhazard);
}
/*
diff --git a/src/evict/evict_lru.c b/src/evict/evict_lru.c
index 748b51acccd..8ea487bbf83 100644
--- a/src/evict/evict_lru.c
+++ b/src/evict/evict_lru.c
@@ -1285,7 +1285,7 @@ __evict_walk_file(WT_SESSION_IMPL *session, uint32_t queue_index, u_int *slotp)
WT_PAGE *page;
WT_PAGE_MODIFY *mod;
WT_REF *ref;
- uint64_t pages_walked;
+ uint64_t pages_seen, refs_walked;
uint32_t walk_flags;
int internal_pages, restarts;
bool enough, modified;
@@ -1320,17 +1320,21 @@ __evict_walk_file(WT_SESSION_IMPL *session, uint32_t queue_index, u_int *slotp)
* Once we hit the page limit, do one more step through the walk in
* case we are appending and only the last page in the file is live.
*/
- for (evict = start, pages_walked = 0;
+ for (evict = start, pages_seen = refs_walked = 0;
evict < end && !enough && (ret == 0 || ret == WT_NOTFOUND);
ret = __wt_tree_walk_count(
- session, &btree->evict_ref, &pages_walked, walk_flags)) {
- enough = pages_walked > cache->evict_max_refs_per_file;
+ session, &btree->evict_ref, &refs_walked, walk_flags)) {
+ enough = refs_walked > cache->evict_max_refs_per_file;
if ((ref = btree->evict_ref) == NULL) {
if (++restarts == 2 || enough)
break;
+ WT_STAT_FAST_CONN_INCR(
+ session, cache_eviction_walks_started);
continue;
}
+ ++pages_seen;
+
/* Ignore root pages entirely. */
if (__wt_ref_is_root(ref))
continue;
@@ -1358,9 +1362,13 @@ __evict_walk_file(WT_SESSION_IMPL *session, uint32_t queue_index, u_int *slotp)
}
/* Pages we no longer need (clean or dirty), are found money. */
+ if (page->read_gen == WT_READGEN_OLDEST) {
+ WT_STAT_FAST_CONN_INCR(
+ session, cache_eviction_pages_queued_oldest);
+ goto fast;
+ }
if (__wt_page_is_empty(page) ||
- F_ISSET(session->dhandle, WT_DHANDLE_DEAD) ||
- page->read_gen == WT_READGEN_OLDEST)
+ F_ISSET(session->dhandle, WT_DHANDLE_DEAD))
goto fast;
/* Skip clean pages if appropriate. */
@@ -1426,6 +1434,8 @@ fast: /* If the page can't be evicted, give up. */
WT_RET_NOTFOUND_OK(ret);
*slotp += (u_int)(evict - start);
+ WT_STAT_FAST_CONN_INCRV(
+ session, cache_eviction_pages_queued, (u_int)(evict - start));
/*
* If we happen to end up on the root page, clear it. We have to track
@@ -1444,10 +1454,11 @@ fast: /* If the page can't be evicted, give up. */
else if (ref->page->read_gen == WT_READGEN_OLDEST)
WT_RET_NOTFOUND_OK(__wt_tree_walk_count(
session, &btree->evict_ref,
- &pages_walked, walk_flags));
+ &refs_walked, walk_flags));
}
- WT_STAT_FAST_CONN_INCRV(session, cache_eviction_walk, pages_walked);
+ WT_STAT_FAST_CONN_INCRV(session, cache_eviction_walk, refs_walked);
+ WT_STAT_FAST_CONN_INCRV(session, cache_eviction_pages_seen, pages_seen);
return (0);
}
@@ -1633,6 +1644,9 @@ __evict_page(WT_SESSION_IMPL *session, bool is_server)
cache->worker_evicts++;
}
} else {
+ if (__wt_page_is_modified(ref->page))
+ WT_STAT_FAST_CONN_INCR(
+ session, cache_eviction_app_dirty);
WT_STAT_FAST_CONN_INCR(session, cache_eviction_app);
cache->app_evicts++;
}
diff --git a/src/include/stat.h b/src/include/stat.h
index 079a9245b07..57126af8aa4 100644
--- a/src/include/stat.h
+++ b/src/include/stat.h
@@ -292,6 +292,8 @@ struct __wt_connection_stats {
int64_t cache_eviction_slow;
int64_t cache_eviction_worker_evicting;
int64_t cache_eviction_force_fail;
+ int64_t cache_eviction_walks_active;
+ int64_t cache_eviction_walks_started;
int64_t cache_eviction_hazard;
int64_t cache_hazard_checks;
int64_t cache_hazard_walks;
@@ -306,15 +308,19 @@ struct __wt_connection_stats {
int64_t cache_bytes_max;
int64_t cache_eviction_maximum_page_size;
int64_t cache_eviction_dirty;
+ int64_t cache_eviction_app_dirty;
int64_t cache_eviction_deepen;
int64_t cache_write_lookaside;
int64_t cache_pages_inuse;
int64_t cache_eviction_force;
int64_t cache_eviction_force_delete;
int64_t cache_eviction_app;
+ int64_t cache_eviction_pages_queued;
+ int64_t cache_eviction_pages_queued_oldest;
int64_t cache_read;
int64_t cache_read_lookaside;
int64_t cache_pages_requested;
+ int64_t cache_eviction_pages_seen;
int64_t cache_eviction_fail;
int64_t cache_eviction_walk;
int64_t cache_write;
diff --git a/src/include/wiredtiger.in b/src/include/wiredtiger.in
index 5da1f574f62..f578f4e6c08 100644
--- a/src/include/wiredtiger.in
+++ b/src/include/wiredtiger.in
@@ -4295,289 +4295,301 @@ extern int wiredtiger_extension_terminate(WT_CONNECTION *connection);
#define WT_STAT_CONN_CACHE_EVICTION_WORKER_EVICTING 1045
/*! cache: failed eviction of pages that exceeded the in-memory maximum */
#define WT_STAT_CONN_CACHE_EVICTION_FORCE_FAIL 1046
+/*! cache: files with active eviction walks */
+#define WT_STAT_CONN_CACHE_EVICTION_WALKS_ACTIVE 1047
+/*! cache: files with new eviction walks started */
+#define WT_STAT_CONN_CACHE_EVICTION_WALKS_STARTED 1048
/*! cache: hazard pointer blocked page eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_HAZARD 1047
+#define WT_STAT_CONN_CACHE_EVICTION_HAZARD 1049
/*! cache: hazard pointer check calls */
-#define WT_STAT_CONN_CACHE_HAZARD_CHECKS 1048
+#define WT_STAT_CONN_CACHE_HAZARD_CHECKS 1050
/*! cache: hazard pointer check entries walked */
-#define WT_STAT_CONN_CACHE_HAZARD_WALKS 1049
+#define WT_STAT_CONN_CACHE_HAZARD_WALKS 1051
/*! cache: hazard pointer maximum array length */
-#define WT_STAT_CONN_CACHE_HAZARD_MAX 1050
+#define WT_STAT_CONN_CACHE_HAZARD_MAX 1052
/*! cache: in-memory page passed criteria to be split */
-#define WT_STAT_CONN_CACHE_INMEM_SPLITTABLE 1051
+#define WT_STAT_CONN_CACHE_INMEM_SPLITTABLE 1053
/*! cache: in-memory page splits */
-#define WT_STAT_CONN_CACHE_INMEM_SPLIT 1052
+#define WT_STAT_CONN_CACHE_INMEM_SPLIT 1054
/*! cache: internal pages evicted */
-#define WT_STAT_CONN_CACHE_EVICTION_INTERNAL 1053
+#define WT_STAT_CONN_CACHE_EVICTION_INTERNAL 1055
/*! cache: internal pages split during eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_SPLIT_INTERNAL 1054
+#define WT_STAT_CONN_CACHE_EVICTION_SPLIT_INTERNAL 1056
/*! cache: leaf pages split during eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_SPLIT_LEAF 1055
+#define WT_STAT_CONN_CACHE_EVICTION_SPLIT_LEAF 1057
/*! cache: lookaside table insert calls */
-#define WT_STAT_CONN_CACHE_LOOKASIDE_INSERT 1056
+#define WT_STAT_CONN_CACHE_LOOKASIDE_INSERT 1058
/*! cache: lookaside table remove calls */
-#define WT_STAT_CONN_CACHE_LOOKASIDE_REMOVE 1057
+#define WT_STAT_CONN_CACHE_LOOKASIDE_REMOVE 1059
/*! cache: maximum bytes configured */
-#define WT_STAT_CONN_CACHE_BYTES_MAX 1058
+#define WT_STAT_CONN_CACHE_BYTES_MAX 1060
/*! cache: maximum page size at eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_MAXIMUM_PAGE_SIZE 1059
+#define WT_STAT_CONN_CACHE_EVICTION_MAXIMUM_PAGE_SIZE 1061
/*! cache: modified pages evicted */
-#define WT_STAT_CONN_CACHE_EVICTION_DIRTY 1060
+#define WT_STAT_CONN_CACHE_EVICTION_DIRTY 1062
+/*! cache: modified pages evicted by application threads */
+#define WT_STAT_CONN_CACHE_EVICTION_APP_DIRTY 1063
/*! cache: page split during eviction deepened the tree */
-#define WT_STAT_CONN_CACHE_EVICTION_DEEPEN 1061
+#define WT_STAT_CONN_CACHE_EVICTION_DEEPEN 1064
/*! cache: page written requiring lookaside records */
-#define WT_STAT_CONN_CACHE_WRITE_LOOKASIDE 1062
+#define WT_STAT_CONN_CACHE_WRITE_LOOKASIDE 1065
/*! cache: pages currently held in the cache */
-#define WT_STAT_CONN_CACHE_PAGES_INUSE 1063
+#define WT_STAT_CONN_CACHE_PAGES_INUSE 1066
/*! cache: pages evicted because they exceeded the in-memory maximum */
-#define WT_STAT_CONN_CACHE_EVICTION_FORCE 1064
+#define WT_STAT_CONN_CACHE_EVICTION_FORCE 1067
/*! cache: pages evicted because they had chains of deleted items */
-#define WT_STAT_CONN_CACHE_EVICTION_FORCE_DELETE 1065
+#define WT_STAT_CONN_CACHE_EVICTION_FORCE_DELETE 1068
/*! cache: pages evicted by application threads */
-#define WT_STAT_CONN_CACHE_EVICTION_APP 1066
+#define WT_STAT_CONN_CACHE_EVICTION_APP 1069
+/*! cache: pages queued for eviction */
+#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED 1070
+/*! cache: pages queued for urgent eviction */
+#define WT_STAT_CONN_CACHE_EVICTION_PAGES_QUEUED_OLDEST 1071
/*! cache: pages read into cache */
-#define WT_STAT_CONN_CACHE_READ 1067
+#define WT_STAT_CONN_CACHE_READ 1072
/*! cache: pages read into cache requiring lookaside entries */
-#define WT_STAT_CONN_CACHE_READ_LOOKASIDE 1068
+#define WT_STAT_CONN_CACHE_READ_LOOKASIDE 1073
/*! cache: pages requested from the cache */
-#define WT_STAT_CONN_CACHE_PAGES_REQUESTED 1069
+#define WT_STAT_CONN_CACHE_PAGES_REQUESTED 1074
+/*! cache: pages seen by eviction walk */
+#define WT_STAT_CONN_CACHE_EVICTION_PAGES_SEEN 1075
/*! cache: pages selected for eviction unable to be evicted */
-#define WT_STAT_CONN_CACHE_EVICTION_FAIL 1070
+#define WT_STAT_CONN_CACHE_EVICTION_FAIL 1076
/*! cache: pages walked for eviction */
-#define WT_STAT_CONN_CACHE_EVICTION_WALK 1071
+#define WT_STAT_CONN_CACHE_EVICTION_WALK 1077
/*! cache: pages written from cache */
-#define WT_STAT_CONN_CACHE_WRITE 1072
+#define WT_STAT_CONN_CACHE_WRITE 1078
/*! cache: pages written requiring in-memory restoration */
-#define WT_STAT_CONN_CACHE_WRITE_RESTORE 1073
+#define WT_STAT_CONN_CACHE_WRITE_RESTORE 1079
/*! cache: percentage overhead */
-#define WT_STAT_CONN_CACHE_OVERHEAD 1074
+#define WT_STAT_CONN_CACHE_OVERHEAD 1080
/*! cache: tracked bytes belonging to internal pages in the cache */
-#define WT_STAT_CONN_CACHE_BYTES_INTERNAL 1075
+#define WT_STAT_CONN_CACHE_BYTES_INTERNAL 1081
/*! cache: tracked bytes belonging to leaf pages in the cache */
-#define WT_STAT_CONN_CACHE_BYTES_LEAF 1076
+#define WT_STAT_CONN_CACHE_BYTES_LEAF 1082
/*! cache: tracked bytes belonging to overflow pages in the cache */
-#define WT_STAT_CONN_CACHE_BYTES_OVERFLOW 1077
+#define WT_STAT_CONN_CACHE_BYTES_OVERFLOW 1083
/*! cache: tracked dirty bytes in the cache */
-#define WT_STAT_CONN_CACHE_BYTES_DIRTY 1078
+#define WT_STAT_CONN_CACHE_BYTES_DIRTY 1084
/*! cache: tracked dirty pages in the cache */
-#define WT_STAT_CONN_CACHE_PAGES_DIRTY 1079
+#define WT_STAT_CONN_CACHE_PAGES_DIRTY 1085
/*! cache: unmodified pages evicted */
-#define WT_STAT_CONN_CACHE_EVICTION_CLEAN 1080
+#define WT_STAT_CONN_CACHE_EVICTION_CLEAN 1086
/*! connection: auto adjusting condition resets */
-#define WT_STAT_CONN_COND_AUTO_WAIT_RESET 1081
+#define WT_STAT_CONN_COND_AUTO_WAIT_RESET 1087
/*! connection: auto adjusting condition wait calls */
-#define WT_STAT_CONN_COND_AUTO_WAIT 1082
+#define WT_STAT_CONN_COND_AUTO_WAIT 1088
/*! connection: files currently open */
-#define WT_STAT_CONN_FILE_OPEN 1083
+#define WT_STAT_CONN_FILE_OPEN 1089
/*! connection: memory allocations */
-#define WT_STAT_CONN_MEMORY_ALLOCATION 1084
+#define WT_STAT_CONN_MEMORY_ALLOCATION 1090
/*! connection: memory frees */
-#define WT_STAT_CONN_MEMORY_FREE 1085
+#define WT_STAT_CONN_MEMORY_FREE 1091
/*! connection: memory re-allocations */
-#define WT_STAT_CONN_MEMORY_GROW 1086
+#define WT_STAT_CONN_MEMORY_GROW 1092
/*! connection: pthread mutex condition wait calls */
-#define WT_STAT_CONN_COND_WAIT 1087
+#define WT_STAT_CONN_COND_WAIT 1093
/*! connection: pthread mutex shared lock read-lock calls */
-#define WT_STAT_CONN_RWLOCK_READ 1088
+#define WT_STAT_CONN_RWLOCK_READ 1094
/*! connection: pthread mutex shared lock write-lock calls */
-#define WT_STAT_CONN_RWLOCK_WRITE 1089
+#define WT_STAT_CONN_RWLOCK_WRITE 1095
/*! connection: total fsync I/Os */
-#define WT_STAT_CONN_FSYNC_IO 1090
+#define WT_STAT_CONN_FSYNC_IO 1096
/*! connection: total read I/Os */
-#define WT_STAT_CONN_READ_IO 1091
+#define WT_STAT_CONN_READ_IO 1097
/*! connection: total write I/Os */
-#define WT_STAT_CONN_WRITE_IO 1092
+#define WT_STAT_CONN_WRITE_IO 1098
/*! cursor: cursor create calls */
-#define WT_STAT_CONN_CURSOR_CREATE 1093
+#define WT_STAT_CONN_CURSOR_CREATE 1099
/*! cursor: cursor insert calls */
-#define WT_STAT_CONN_CURSOR_INSERT 1094
+#define WT_STAT_CONN_CURSOR_INSERT 1100
/*! cursor: cursor next calls */
-#define WT_STAT_CONN_CURSOR_NEXT 1095
+#define WT_STAT_CONN_CURSOR_NEXT 1101
/*! cursor: cursor prev calls */
-#define WT_STAT_CONN_CURSOR_PREV 1096
+#define WT_STAT_CONN_CURSOR_PREV 1102
/*! cursor: cursor remove calls */
-#define WT_STAT_CONN_CURSOR_REMOVE 1097
+#define WT_STAT_CONN_CURSOR_REMOVE 1103
/*! cursor: cursor reset calls */
-#define WT_STAT_CONN_CURSOR_RESET 1098
+#define WT_STAT_CONN_CURSOR_RESET 1104
/*! cursor: cursor restarted searches */
-#define WT_STAT_CONN_CURSOR_RESTART 1099
+#define WT_STAT_CONN_CURSOR_RESTART 1105
/*! cursor: cursor search calls */
-#define WT_STAT_CONN_CURSOR_SEARCH 1100
+#define WT_STAT_CONN_CURSOR_SEARCH 1106
/*! cursor: cursor search near calls */
-#define WT_STAT_CONN_CURSOR_SEARCH_NEAR 1101
+#define WT_STAT_CONN_CURSOR_SEARCH_NEAR 1107
/*! cursor: cursor update calls */
-#define WT_STAT_CONN_CURSOR_UPDATE 1102
+#define WT_STAT_CONN_CURSOR_UPDATE 1108
/*! cursor: truncate calls */
-#define WT_STAT_CONN_CURSOR_TRUNCATE 1103
+#define WT_STAT_CONN_CURSOR_TRUNCATE 1109
/*! data-handle: connection data handles currently active */
-#define WT_STAT_CONN_DH_CONN_HANDLE_COUNT 1104
+#define WT_STAT_CONN_DH_CONN_HANDLE_COUNT 1110
/*! data-handle: connection sweep candidate became referenced */
-#define WT_STAT_CONN_DH_SWEEP_REF 1105
+#define WT_STAT_CONN_DH_SWEEP_REF 1111
/*! data-handle: connection sweep dhandles closed */
-#define WT_STAT_CONN_DH_SWEEP_CLOSE 1106
+#define WT_STAT_CONN_DH_SWEEP_CLOSE 1112
/*! data-handle: connection sweep dhandles removed from hash list */
-#define WT_STAT_CONN_DH_SWEEP_REMOVE 1107
+#define WT_STAT_CONN_DH_SWEEP_REMOVE 1113
/*! data-handle: connection sweep time-of-death sets */
-#define WT_STAT_CONN_DH_SWEEP_TOD 1108
+#define WT_STAT_CONN_DH_SWEEP_TOD 1114
/*! data-handle: connection sweeps */
-#define WT_STAT_CONN_DH_SWEEPS 1109
+#define WT_STAT_CONN_DH_SWEEPS 1115
/*! data-handle: session dhandles swept */
-#define WT_STAT_CONN_DH_SESSION_HANDLES 1110
+#define WT_STAT_CONN_DH_SESSION_HANDLES 1116
/*! data-handle: session sweep attempts */
-#define WT_STAT_CONN_DH_SESSION_SWEEPS 1111
+#define WT_STAT_CONN_DH_SESSION_SWEEPS 1117
/*! log: busy returns attempting to switch slots */
-#define WT_STAT_CONN_LOG_SLOT_SWITCH_BUSY 1112
+#define WT_STAT_CONN_LOG_SLOT_SWITCH_BUSY 1118
/*! log: consolidated slot closures */
-#define WT_STAT_CONN_LOG_SLOT_CLOSES 1113
+#define WT_STAT_CONN_LOG_SLOT_CLOSES 1119
/*! log: consolidated slot join races */
-#define WT_STAT_CONN_LOG_SLOT_RACES 1114
+#define WT_STAT_CONN_LOG_SLOT_RACES 1120
/*! log: consolidated slot join transitions */
-#define WT_STAT_CONN_LOG_SLOT_TRANSITIONS 1115
+#define WT_STAT_CONN_LOG_SLOT_TRANSITIONS 1121
/*! log: consolidated slot joins */
-#define WT_STAT_CONN_LOG_SLOT_JOINS 1116
+#define WT_STAT_CONN_LOG_SLOT_JOINS 1122
/*! log: consolidated slot unbuffered writes */
-#define WT_STAT_CONN_LOG_SLOT_UNBUFFERED 1117
+#define WT_STAT_CONN_LOG_SLOT_UNBUFFERED 1123
/*! log: log bytes of payload data */
-#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1118
+#define WT_STAT_CONN_LOG_BYTES_PAYLOAD 1124
/*! log: log bytes written */
-#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1119
+#define WT_STAT_CONN_LOG_BYTES_WRITTEN 1125
/*! log: log files manually zero-filled */
-#define WT_STAT_CONN_LOG_ZERO_FILLS 1120
+#define WT_STAT_CONN_LOG_ZERO_FILLS 1126
/*! log: log flush operations */
-#define WT_STAT_CONN_LOG_FLUSH 1121
+#define WT_STAT_CONN_LOG_FLUSH 1127
/*! log: log force write operations */
-#define WT_STAT_CONN_LOG_FORCE_WRITE 1122
+#define WT_STAT_CONN_LOG_FORCE_WRITE 1128
/*! log: log force write operations skipped */
-#define WT_STAT_CONN_LOG_FORCE_WRITE_SKIP 1123
+#define WT_STAT_CONN_LOG_FORCE_WRITE_SKIP 1129
/*! log: log records compressed */
-#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1124
+#define WT_STAT_CONN_LOG_COMPRESS_WRITES 1130
/*! log: log records not compressed */
-#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1125
+#define WT_STAT_CONN_LOG_COMPRESS_WRITE_FAILS 1131
/*! log: log records too small to compress */
-#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1126
+#define WT_STAT_CONN_LOG_COMPRESS_SMALL 1132
/*! log: log release advances write LSN */
-#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1127
+#define WT_STAT_CONN_LOG_RELEASE_WRITE_LSN 1133
/*! log: log scan operations */
-#define WT_STAT_CONN_LOG_SCANS 1128
+#define WT_STAT_CONN_LOG_SCANS 1134
/*! log: log scan records requiring two reads */
-#define WT_STAT_CONN_LOG_SCAN_REREADS 1129
+#define WT_STAT_CONN_LOG_SCAN_REREADS 1135
/*! log: log server thread advances write LSN */
-#define WT_STAT_CONN_LOG_WRITE_LSN 1130
+#define WT_STAT_CONN_LOG_WRITE_LSN 1136
/*! log: log server thread write LSN walk skipped */
-#define WT_STAT_CONN_LOG_WRITE_LSN_SKIP 1131
+#define WT_STAT_CONN_LOG_WRITE_LSN_SKIP 1137
/*! log: log sync operations */
-#define WT_STAT_CONN_LOG_SYNC 1132
+#define WT_STAT_CONN_LOG_SYNC 1138
/*! log: log sync time duration (usecs) */
-#define WT_STAT_CONN_LOG_SYNC_DURATION 1133
+#define WT_STAT_CONN_LOG_SYNC_DURATION 1139
/*! log: log sync_dir operations */
-#define WT_STAT_CONN_LOG_SYNC_DIR 1134
+#define WT_STAT_CONN_LOG_SYNC_DIR 1140
/*! log: log sync_dir time duration (usecs) */
-#define WT_STAT_CONN_LOG_SYNC_DIR_DURATION 1135
+#define WT_STAT_CONN_LOG_SYNC_DIR_DURATION 1141
/*! log: log write operations */
-#define WT_STAT_CONN_LOG_WRITES 1136
+#define WT_STAT_CONN_LOG_WRITES 1142
/*! log: logging bytes consolidated */
-#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1137
+#define WT_STAT_CONN_LOG_SLOT_CONSOLIDATED 1143
/*! log: maximum log file size */
-#define WT_STAT_CONN_LOG_MAX_FILESIZE 1138
+#define WT_STAT_CONN_LOG_MAX_FILESIZE 1144
/*! log: number of pre-allocated log files to create */
-#define WT_STAT_CONN_LOG_PREALLOC_MAX 1139
+#define WT_STAT_CONN_LOG_PREALLOC_MAX 1145
/*! log: pre-allocated log files not ready and missed */
-#define WT_STAT_CONN_LOG_PREALLOC_MISSED 1140
+#define WT_STAT_CONN_LOG_PREALLOC_MISSED 1146
/*! log: pre-allocated log files prepared */
-#define WT_STAT_CONN_LOG_PREALLOC_FILES 1141
+#define WT_STAT_CONN_LOG_PREALLOC_FILES 1147
/*! log: pre-allocated log files used */
-#define WT_STAT_CONN_LOG_PREALLOC_USED 1142
+#define WT_STAT_CONN_LOG_PREALLOC_USED 1148
/*! log: records processed by log scan */
-#define WT_STAT_CONN_LOG_SCAN_RECORDS 1143
+#define WT_STAT_CONN_LOG_SCAN_RECORDS 1149
/*! log: total in-memory size of compressed records */
-#define WT_STAT_CONN_LOG_COMPRESS_MEM 1144
+#define WT_STAT_CONN_LOG_COMPRESS_MEM 1150
/*! log: total log buffer size */
-#define WT_STAT_CONN_LOG_BUFFER_SIZE 1145
+#define WT_STAT_CONN_LOG_BUFFER_SIZE 1151
/*! log: total size of compressed records */
-#define WT_STAT_CONN_LOG_COMPRESS_LEN 1146
+#define WT_STAT_CONN_LOG_COMPRESS_LEN 1152
/*! log: written slots coalesced */
-#define WT_STAT_CONN_LOG_SLOT_COALESCED 1147
+#define WT_STAT_CONN_LOG_SLOT_COALESCED 1153
/*! log: yields waiting for previous log file close */
-#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1148
+#define WT_STAT_CONN_LOG_CLOSE_YIELDS 1154
/*! reconciliation: fast-path pages deleted */
-#define WT_STAT_CONN_REC_PAGE_DELETE_FAST 1149
+#define WT_STAT_CONN_REC_PAGE_DELETE_FAST 1155
/*! reconciliation: page reconciliation calls */
-#define WT_STAT_CONN_REC_PAGES 1150
+#define WT_STAT_CONN_REC_PAGES 1156
/*! reconciliation: page reconciliation calls for eviction */
-#define WT_STAT_CONN_REC_PAGES_EVICTION 1151
+#define WT_STAT_CONN_REC_PAGES_EVICTION 1157
/*! reconciliation: pages deleted */
-#define WT_STAT_CONN_REC_PAGE_DELETE 1152
+#define WT_STAT_CONN_REC_PAGE_DELETE 1158
/*! reconciliation: split bytes currently awaiting free */
-#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1153
+#define WT_STAT_CONN_REC_SPLIT_STASHED_BYTES 1159
/*! reconciliation: split objects currently awaiting free */
-#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1154
+#define WT_STAT_CONN_REC_SPLIT_STASHED_OBJECTS 1160
/*! session: open cursor count */
-#define WT_STAT_CONN_SESSION_CURSOR_OPEN 1155
+#define WT_STAT_CONN_SESSION_CURSOR_OPEN 1161
/*! session: open session count */
-#define WT_STAT_CONN_SESSION_OPEN 1156
+#define WT_STAT_CONN_SESSION_OPEN 1162
/*! thread-state: active filesystem fsync calls */
-#define WT_STAT_CONN_FSYNC_ACTIVE 1157
+#define WT_STAT_CONN_FSYNC_ACTIVE 1163
/*! thread-state: active filesystem read calls */
-#define WT_STAT_CONN_READ_ACTIVE 1158
+#define WT_STAT_CONN_READ_ACTIVE 1164
/*! thread-state: active filesystem write calls */
-#define WT_STAT_CONN_WRITE_ACTIVE 1159
+#define WT_STAT_CONN_WRITE_ACTIVE 1165
/*! thread-yield: page acquire busy blocked */
-#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1160
+#define WT_STAT_CONN_PAGE_BUSY_BLOCKED 1166
/*! thread-yield: page acquire eviction blocked */
-#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1161
+#define WT_STAT_CONN_PAGE_FORCIBLE_EVICT_BLOCKED 1167
/*! thread-yield: page acquire locked blocked */
-#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1162
+#define WT_STAT_CONN_PAGE_LOCKED_BLOCKED 1168
/*! thread-yield: page acquire read blocked */
-#define WT_STAT_CONN_PAGE_READ_BLOCKED 1163
+#define WT_STAT_CONN_PAGE_READ_BLOCKED 1169
/*! thread-yield: page acquire time sleeping (usecs) */
-#define WT_STAT_CONN_PAGE_SLEEP 1164
+#define WT_STAT_CONN_PAGE_SLEEP 1170
/*! transaction: number of named snapshots created */
-#define WT_STAT_CONN_TXN_SNAPSHOTS_CREATED 1165
+#define WT_STAT_CONN_TXN_SNAPSHOTS_CREATED 1171
/*! transaction: number of named snapshots dropped */
-#define WT_STAT_CONN_TXN_SNAPSHOTS_DROPPED 1166
+#define WT_STAT_CONN_TXN_SNAPSHOTS_DROPPED 1172
/*! transaction: transaction begins */
-#define WT_STAT_CONN_TXN_BEGIN 1167
+#define WT_STAT_CONN_TXN_BEGIN 1173
/*! transaction: transaction checkpoint currently running */
-#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1168
+#define WT_STAT_CONN_TXN_CHECKPOINT_RUNNING 1174
/*! transaction: transaction checkpoint generation */
-#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1169
+#define WT_STAT_CONN_TXN_CHECKPOINT_GENERATION 1175
/*! transaction: transaction checkpoint max time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1170
+#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MAX 1176
/*! transaction: transaction checkpoint min time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1171
+#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_MIN 1177
/*! transaction: transaction checkpoint most recent time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1172
+#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_RECENT 1178
/*! transaction: transaction checkpoint total time (msecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1173
+#define WT_STAT_CONN_TXN_CHECKPOINT_TIME_TOTAL 1179
/*! transaction: transaction checkpoints */
-#define WT_STAT_CONN_TXN_CHECKPOINT 1174
+#define WT_STAT_CONN_TXN_CHECKPOINT 1180
/*! transaction: transaction failures due to cache overflow */
-#define WT_STAT_CONN_TXN_FAIL_CACHE 1175
+#define WT_STAT_CONN_TXN_FAIL_CACHE 1181
/*! transaction: transaction fsync calls for checkpoint after allocating
* the transaction ID */
-#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST 1176
+#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST 1182
/*! transaction: transaction fsync calls for checkpoint before allocating
* the transaction ID */
-#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_PRE 1177
+#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_PRE 1183
/*! transaction: transaction fsync duration for checkpoint after
* allocating the transaction ID (usecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1178
+#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_POST_DURATION 1184
/*! transaction: transaction fsync duration for checkpoint before
* allocating the transaction ID (usecs) */
-#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_PRE_DURATION 1179
+#define WT_STAT_CONN_TXN_CHECKPOINT_FSYNC_PRE_DURATION 1185
/*! transaction: transaction range of IDs currently pinned */
-#define WT_STAT_CONN_TXN_PINNED_RANGE 1180
+#define WT_STAT_CONN_TXN_PINNED_RANGE 1186
/*! transaction: transaction range of IDs currently pinned by a checkpoint */
-#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1181
+#define WT_STAT_CONN_TXN_PINNED_CHECKPOINT_RANGE 1187
/*! transaction: transaction range of IDs currently pinned by named
* snapshots */
-#define WT_STAT_CONN_TXN_PINNED_SNAPSHOT_RANGE 1182
+#define WT_STAT_CONN_TXN_PINNED_SNAPSHOT_RANGE 1188
/*! transaction: transaction sync calls */
-#define WT_STAT_CONN_TXN_SYNC 1183
+#define WT_STAT_CONN_TXN_SYNC 1189
/*! transaction: transactions committed */
-#define WT_STAT_CONN_TXN_COMMIT 1184
+#define WT_STAT_CONN_TXN_COMMIT 1190
/*! transaction: transactions rolled back */
-#define WT_STAT_CONN_TXN_ROLLBACK 1185
+#define WT_STAT_CONN_TXN_ROLLBACK 1191
/*!
* @}
diff --git a/src/support/stat.c b/src/support/stat.c
index 661f155e932..d972f0c140f 100644
--- a/src/support/stat.c
+++ b/src/support/stat.c
@@ -561,6 +561,8 @@ static const char * const __stats_connection_desc[] = {
"cache: eviction server unable to reach eviction goal",
"cache: eviction worker thread evicting pages",
"cache: failed eviction of pages that exceeded the in-memory maximum",
+ "cache: files with active eviction walks",
+ "cache: files with new eviction walks started",
"cache: hazard pointer blocked page eviction",
"cache: hazard pointer check calls",
"cache: hazard pointer check entries walked",
@@ -575,15 +577,19 @@ static const char * const __stats_connection_desc[] = {
"cache: maximum bytes configured",
"cache: maximum page size at eviction",
"cache: modified pages evicted",
+ "cache: modified pages evicted by application threads",
"cache: page split during eviction deepened the tree",
"cache: page written requiring lookaside records",
"cache: pages currently held in the cache",
"cache: pages evicted because they exceeded the in-memory maximum",
"cache: pages evicted because they had chains of deleted items",
"cache: pages evicted by application threads",
+ "cache: pages queued for eviction",
+ "cache: pages queued for urgent eviction",
"cache: pages read into cache",
"cache: pages read into cache requiring lookaside entries",
"cache: pages requested from the cache",
+ "cache: pages seen by eviction walk",
"cache: pages selected for eviction unable to be evicted",
"cache: pages walked for eviction",
"cache: pages written from cache",
@@ -777,6 +783,8 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats)
stats->cache_eviction_slow = 0;
stats->cache_eviction_worker_evicting = 0;
stats->cache_eviction_force_fail = 0;
+ /* not clearing cache_eviction_walks_active */
+ stats->cache_eviction_walks_started = 0;
stats->cache_eviction_hazard = 0;
stats->cache_hazard_checks = 0;
stats->cache_hazard_walks = 0;
@@ -791,15 +799,19 @@ __wt_stat_connection_clear_single(WT_CONNECTION_STATS *stats)
/* not clearing cache_bytes_max */
/* not clearing cache_eviction_maximum_page_size */
stats->cache_eviction_dirty = 0;
+ stats->cache_eviction_app_dirty = 0;
stats->cache_eviction_deepen = 0;
stats->cache_write_lookaside = 0;
/* not clearing cache_pages_inuse */
stats->cache_eviction_force = 0;
stats->cache_eviction_force_delete = 0;
stats->cache_eviction_app = 0;
+ stats->cache_eviction_pages_queued = 0;
+ stats->cache_eviction_pages_queued_oldest = 0;
stats->cache_read = 0;
stats->cache_read_lookaside = 0;
stats->cache_pages_requested = 0;
+ stats->cache_eviction_pages_seen = 0;
stats->cache_eviction_fail = 0;
stats->cache_eviction_walk = 0;
stats->cache_write = 0;
@@ -998,6 +1010,10 @@ __wt_stat_connection_aggregate(
WT_STAT_READ(from, cache_eviction_worker_evicting);
to->cache_eviction_force_fail +=
WT_STAT_READ(from, cache_eviction_force_fail);
+ to->cache_eviction_walks_active +=
+ WT_STAT_READ(from, cache_eviction_walks_active);
+ to->cache_eviction_walks_started +=
+ WT_STAT_READ(from, cache_eviction_walks_started);
to->cache_eviction_hazard +=
WT_STAT_READ(from, cache_eviction_hazard);
to->cache_hazard_checks += WT_STAT_READ(from, cache_hazard_checks);
@@ -1021,6 +1037,8 @@ __wt_stat_connection_aggregate(
to->cache_eviction_maximum_page_size +=
WT_STAT_READ(from, cache_eviction_maximum_page_size);
to->cache_eviction_dirty += WT_STAT_READ(from, cache_eviction_dirty);
+ to->cache_eviction_app_dirty +=
+ WT_STAT_READ(from, cache_eviction_app_dirty);
to->cache_eviction_deepen +=
WT_STAT_READ(from, cache_eviction_deepen);
to->cache_write_lookaside +=
@@ -1030,10 +1048,16 @@ __wt_stat_connection_aggregate(
to->cache_eviction_force_delete +=
WT_STAT_READ(from, cache_eviction_force_delete);
to->cache_eviction_app += WT_STAT_READ(from, cache_eviction_app);
+ to->cache_eviction_pages_queued +=
+ WT_STAT_READ(from, cache_eviction_pages_queued);
+ to->cache_eviction_pages_queued_oldest +=
+ WT_STAT_READ(from, cache_eviction_pages_queued_oldest);
to->cache_read += WT_STAT_READ(from, cache_read);
to->cache_read_lookaside += WT_STAT_READ(from, cache_read_lookaside);
to->cache_pages_requested +=
WT_STAT_READ(from, cache_pages_requested);
+ to->cache_eviction_pages_seen +=
+ WT_STAT_READ(from, cache_eviction_pages_seen);
to->cache_eviction_fail += WT_STAT_READ(from, cache_eviction_fail);
to->cache_eviction_walk += WT_STAT_READ(from, cache_eviction_walk);
to->cache_write += WT_STAT_READ(from, cache_write);