From 6a5f4d3af0a06dfa51bc84176480f4c3dc637db1 Mon Sep 17 00:00:00 2001 From: Michael Cahill Date: Thu, 25 Oct 2012 15:56:26 +1100 Subject: Skew eviction (much) further in favor of leaf pages. --- src/btree/bt_evict.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/btree/bt_evict.c b/src/btree/bt_evict.c index dec1651dd36..dd12850484e 100644 --- a/src/btree/bt_evict.c +++ b/src/btree/bt_evict.c @@ -21,6 +21,9 @@ static int __evict_worker(WT_SESSION_IMPL *); * number of pages from each file's in-memory tree for each page we evict. */ #define WT_EVICT_GROUP 30 /* Consider N pages as LRU candidates */ +#define WT_EVICT_INT_SKEW (1<<20) /* Prefer leaf pages over internal + pages by this many increments of the + read generation. */ #define WT_EVICT_WALK_PER_FILE 5 /* Pages to visit per file */ #define WT_EVICT_WALK_BASE 50 /* Pages tracked across file visits */ #define WT_EVICT_WALK_INCR 100 /* Pages added each walk */ @@ -820,8 +823,8 @@ __evict_lru_cmp(const void *a, const void *b) a_lru = a_page->read_gen; b_lru = b_page->read_gen; if (a_page->type == WT_PAGE_ROW_INT || a_page->type == WT_PAGE_COL_INT) - a_lru += WT_EVICT_GROUP; + a_lru += WT_EVICT_INT_SKEW; if (b_page->type == WT_PAGE_ROW_INT || b_page->type == WT_PAGE_COL_INT) - b_lru += WT_EVICT_GROUP; + b_lru += WT_EVICT_INT_SKEW; return (a_lru > b_lru ? 1 : (a_lru < b_lru ? -1 : 0)); } -- cgit v1.2.1