diff options
author | Alex Gorrod <alexg@wiredtiger.com> | 2015-11-23 06:48:07 +0000 |
---|---|---|
committer | Alex Gorrod <alexg@wiredtiger.com> | 2015-11-23 06:48:07 +0000 |
commit | 5eb3df72b825dbbd6f4dcacc519016aa6a45d026 (patch) | |
tree | a11003b9939f0222a59a91396f45018c6fb646ba /src | |
parent | 2d01a566ba7b3576cb5b45af55479b3c06995589 (diff) | |
download | mongo-5eb3df72b825dbbd6f4dcacc519016aa6a45d026.tar.gz |
SERVER-21585 Don't use the lookaside file until the cache is stuck full.
Also only write into the lookaside file from internal (aka eviction)
threads, so application threads don't pay the performance cost.
It is possible that the cache stuck check is too restrictive, but using
only the eviction aggressive flag can result in writing a lot of content
to the lookaside file when pages can still be evicted.
Diffstat (limited to 'src')
-rw-r--r-- | src/evict/evict_page.c | 3 | ||||
-rw-r--r-- | src/include/cache.i | 11 |
2 files changed, 2 insertions, 12 deletions
diff --git a/src/evict/evict_page.c b/src/evict/evict_page.c index 94c969fa5bb..2e5f82d1ff8 100644 --- a/src/evict/evict_page.c +++ b/src/evict/evict_page.c @@ -473,7 +473,8 @@ __evict_review( LF_SET(WT_EVICT_IN_MEMORY | WT_EVICT_UPDATE_RESTORE); else if (page->read_gen == WT_READGEN_OLDEST) LF_SET(WT_EVICT_UPDATE_RESTORE); - else if (__wt_eviction_aggressive(session)) + else if (F_ISSET(session, WT_SESSION_INTERNAL) && + F_ISSET(S2C(session)->cache, WT_CACHE_STUCK)) LF_SET(WT_EVICT_LOOKASIDE); } diff --git a/src/include/cache.i b/src/include/cache.i index a95138c3f0f..7cbd72853c3 100644 --- a/src/include/cache.i +++ b/src/include/cache.i @@ -131,17 +131,6 @@ __wt_session_can_wait(WT_SESSION_IMPL *session) } /* - * __wt_eviction_aggressive -- - * Return if the eviction server is running in aggressive mode. - */ -static inline bool -__wt_eviction_aggressive(WT_SESSION_IMPL *session) -{ - return (FLD_ISSET( - S2C(session)->cache->state, WT_EVICT_PASS_AGGRESSIVE)); -} - -/* * __wt_eviction_dirty_target -- * Return if the eviction server is running to reduce the number of dirty * pages (versus running to discard pages from the cache). |