Skip to content

Commit

Permalink
Merge pull request #2528 from wiredtiger/wt-2425
Browse files Browse the repository at this point in the history
WT-2425: evict-btree read through performance drop
  • Loading branch information
agorrod committed Feb 24, 2016
2 parents 7fb05a7 + 8d9cab3 commit 749a9fb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
1 change: 1 addition & 0 deletions dist/s_string.ok
Expand Up @@ -113,6 +113,7 @@ FORALL
FOREACH
FULLFSYNC
FindFirstFile
Fixup
Fk
FlushFileBuffers
Fprintf
Expand Down
14 changes: 5 additions & 9 deletions src/evict/evict_lru.c
Expand Up @@ -1369,12 +1369,10 @@ __evict_get_ref(
WT_SESSION_IMPL *session, bool is_server, WT_BTREE **btreep, WT_REF **refp)
{
WT_CACHE *cache;
WT_CONNECTION_IMPL *conn;
WT_EVICT_ENTRY *evict;
uint32_t candidates;

conn = S2C(session);
cache = conn->cache;
cache = S2C(session)->cache;
*btreep = NULL;
*refp = NULL;

Expand All @@ -1394,14 +1392,12 @@ __evict_get_ref(
}

/*
* The eviction server normally only tries to evict half of the pages
* before looking for more, unless there isn't anybody else to do the
* work, we're stuck, or there's only a single candidate (that happens
* in very small environments).
* Only evict half of the pages before looking for more. The remainder
* are left to eviction workers (if configured), or application threads
* if necessary.
*/
candidates = cache->evict_candidates;
if (is_server && conn->evict_workers_max != 0 &&
!F_ISSET(cache, WT_CACHE_STUCK) && candidates > 1)
if (is_server && candidates > 1)
candidates /= 2;

/* Get the next page queued for eviction. */
Expand Down

0 comments on commit 749a9fb

Please sign in to comment.