diff options
author | Alex Gorrod <alexander.gorrod@mongodb.com> | 2016-04-11 16:07:14 +1000 |
---|---|---|
committer | Alex Gorrod <alexander.gorrod@mongodb.com> | 2016-04-11 16:07:14 +1000 |
commit | 353af609a97782ff86c97e5b6994399821ca57bd (patch) | |
tree | bd1ecc089413479ac81385819686040bccb05abb | |
parent | 51287d161311cf199680298853f170aba66ce7bf (diff) | |
parent | 2add6ea33102332a6c67cd2f4076c2ba9dafbcaf (diff) | |
download | mongo-353af609a97782ff86c97e5b6994399821ca57bd.tar.gz |
Merge pull request #2641 from wiredtiger/server-22831-backport30
SERVER-22831 Queue more leaf pages than internal pages for eviction.
-rw-r--r-- | src/evict/evict_lru.c | 14 |
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)); } |