From 2add6ea33102332a6c67cd2f4076c2ba9dafbcaf Mon Sep 17 00:00:00 2001 From: Alex Gorrod Date: Fri, 26 Feb 2016 08:52:35 +1100 Subject: Merge pull request #2532 from wiredtiger/server-22831 SERVER-22831 Queue more leaf pages than internal pages for eviction. (cherry picked from commit 799ca57b6c597c864f12609fdedc4b3de7ebdec9) --- src/evict/evict_lru.c | 14 +++++++++----- 1 file 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)); } -- cgit v1.2.1