summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bench/wtperf/runners/checkpoint-stress.wtperf5
-rw-r--r--src/btree/bt_read.c7
-rw-r--r--src/btree/bt_split.c8
-rw-r--r--src/evict/evict_lru.c8
4 files changed, 22 insertions, 6 deletions
diff --git a/bench/wtperf/runners/checkpoint-stress.wtperf b/bench/wtperf/runners/checkpoint-stress.wtperf
index 6c517c6ddae..d992f69eb67 100644
--- a/bench/wtperf/runners/checkpoint-stress.wtperf
+++ b/bench/wtperf/runners/checkpoint-stress.wtperf
@@ -10,7 +10,7 @@ compression="snappy"
populate_threads=1
checkpoint_interval=60
checkpoint_threads=1
-report_interval=5
+report_interval=10
# Run for a longer duration to ensure checkpoints are completing.
run_time=600
# MongoDB always has multiple tables, and checkpoints behave differently when
@@ -18,3 +18,6 @@ run_time=600
table_count=2
threads=((count=6,updates=1))
value_sz=1000
+sample_interval=10
+sample_rate=1
+warmup=120
diff --git a/src/btree/bt_read.c b/src/btree/bt_read.c
index fd9c371f8c3..b096fd432e9 100644
--- a/src/btree/bt_read.c
+++ b/src/btree/bt_read.c
@@ -327,6 +327,13 @@ __evict_force_check(WT_SESSION_IMPL *session, WT_REF *ref)
if (__wt_hazard_count(session, page) > 1)
return (false);
+ /*
+ * If we have already tried and the transaction state has not moved on,
+ * eviction is highly likely to fail.
+ */
+ if (page->modify->last_oldest_id == __wt_txn_oldest_id(session))
+ return (false);
+
if (page->memory_footprint < btree->maxmempage)
return (__wt_leaf_page_can_split(session, page));
diff --git a/src/btree/bt_split.c b/src/btree/bt_split.c
index 700c2f3b192..490e8aae788 100644
--- a/src/btree/bt_split.c
+++ b/src/btree/bt_split.c
@@ -2239,6 +2239,14 @@ __wt_split_rewrite(WT_SESSION_IMPL *session, WT_REF *ref, WT_MULTI *multi)
WT_ERR(__split_multi_inmem(session, page, multi, new));
/*
+ * If the new page is modified, save the oldest ID from reconciliation
+ * to avoid repeatedly attempting eviction on the same page.
+ */
+ if (new->page->modify != NULL)
+ new->page->modify->last_oldest_id =
+ page->modify->last_oldest_id;
+
+ /*
* The rewrite succeeded, we can no longer fail.
*
* Finalize the move, discarding moved update lists from the original
diff --git a/src/evict/evict_lru.c b/src/evict/evict_lru.c
index 44031729e82..5a9f4dabb08 100644
--- a/src/evict/evict_lru.c
+++ b/src/evict/evict_lru.c
@@ -573,7 +573,7 @@ __evict_pass(WT_SESSION_IMPL *session)
if (cache->evict_empty_score < WT_EVICT_EMPTY_SCORE_CUTOFF ||
(!WT_EVICT_HAS_WORKERS(session) &&
!__evict_queue_empty(cache->evict_urgent_queue)))
- WT_RET_NOTFOUND_OK(__evict_lru_pages(session, true));
+ WT_RET(__evict_lru_pages(session, true));
/*
* If we're making progress, keep going; if we're not making
@@ -801,12 +801,10 @@ __evict_lru_pages(WT_SESSION_IMPL *session, bool is_server)
/* If a worker thread found the queue empty, pause. */
if (ret == WT_NOTFOUND && !is_server &&
- F_ISSET(S2C(session), WT_CONN_EVICTION_RUN)) {
- ret = 0;
+ F_ISSET(S2C(session), WT_CONN_EVICTION_RUN))
__wt_cond_wait(session, conn->evict_threads.wait_cond, 10000);
- }
- return (ret);
+ return (ret == WT_NOTFOUND ? 0 : ret);
}
/*