summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Gorrod <alexander.gorrod@mongodb.com>2016-02-26 08:52:35 +1100
committerMichael Cahill <michael.cahill@mongodb.com>2016-04-11 15:18:59 +1000
commit2add6ea33102332a6c67cd2f4076c2ba9dafbcaf (patch)
treebd1ecc089413479ac81385819686040bccb05abb
parent51287d161311cf199680298853f170aba66ce7bf (diff)
downloadmongo-2add6ea33102332a6c67cd2f4076c2ba9dafbcaf.tar.gz
Merge pull request #2532 from wiredtiger/server-22831
SERVER-22831 Queue more leaf pages than internal pages for eviction. (cherry picked from commit 799ca57b6c597c864f12609fdedc4b3de7ebdec9)
-rw-r--r--src/evict/evict_lru.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/evict/evict_lru.c b/src/evict/evict_lru.c
index 2ae3dd6b9a5..47917289503 100644
--- a/src/evict/evict_lru.c
+++ b/src/evict/evict_lru.c
@@ -1213,7 +1213,9 @@ __evict_walk_file(WT_SESSION_IMPL *session, u_int *slotp, uint32_t flags)
continue;
/* Pages we no longer need (clean or dirty), are found money. */
- if (__wt_page_is_empty(page))
+ if (__wt_page_is_empty(page) ||
+ F_ISSET(session->dhandle, WT_DHANDLE_DEAD) ||
+ page->read_gen == WT_READGEN_OLDEST)
goto fast;
/* Optionally ignore clean pages. */
@@ -1225,14 +1227,13 @@ __evict_walk_file(WT_SESSION_IMPL *session, u_int *slotp, uint32_t flags)
* eviction, skip anything that isn't marked.
*/
if (LF_ISSET(WT_EVICT_PASS_WOULD_BLOCK) &&
- page->memory_footprint < btree->maxmempage &&
- page->read_gen != WT_READGEN_OLDEST)
+ page->memory_footprint < (btree->maxmempage * 8) / 10)
continue;
/* Limit internal pages to 50% unless we get aggressive. */
if (WT_PAGE_IS_INTERNAL(page) &&
- ++internal_pages > WT_EVICT_WALK_PER_FILE / 2 &&
- !LF_ISSET(WT_EVICT_PASS_AGGRESSIVE))
+ !LF_ISSET(WT_EVICT_PASS_AGGRESSIVE) &&
+ internal_pages >= (int)(evict - start) / 2)
continue;
/*
@@ -1282,6 +1283,9 @@ fast: /* If the page can't be evicted, give up. */
__evict_init_candidate(session, evict, ref);
++evict;
+ if (WT_PAGE_IS_INTERNAL(page))
+ ++internal_pages;
+
WT_RET(__wt_verbose(session, WT_VERB_EVICTSERVER,
"select: %p, size %" PRIu64, page, page->memory_footprint));
}