From 4d509d921dac2738a4673c69a40385ecef2b126d Mon Sep 17 00:00:00 2001 From: Chenhao Qu Date: Wed, 2 Nov 2022 11:57:10 +1100 Subject: Import wiredtiger: b95995c695679af17767e64261031e02bcad31fb from branch mongodb-master ref: bba610ce5d..b95995c695 for: 6.2.0-rc0 WT-10053 Review connection cache and eviction verbosity --- src/third_party/wiredtiger/import.data | 2 +- src/third_party/wiredtiger/src/conn/conn_cache_pool.c | 6 +++--- src/third_party/wiredtiger/src/conn/conn_tiered.c | 8 +++++--- src/third_party/wiredtiger/src/evict/evict_lru.c | 12 ++++++------ 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 3c260c84c65..651542a9e1a 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -2,5 +2,5 @@ "vendor": "wiredtiger", "github": "wiredtiger/wiredtiger.git", "branch": "mongodb-master", - "commit": "bba610ce5d597ee4f67a67569c283dc035020d05" + "commit": "b95995c695679af17767e64261031e02bcad31fb" } diff --git a/src/third_party/wiredtiger/src/conn/conn_cache_pool.c b/src/third_party/wiredtiger/src/conn/conn_cache_pool.c index d7a317fd09c..587580df1d4 100644 --- a/src/third_party/wiredtiger/src/conn/conn_cache_pool.c +++ b/src/third_party/wiredtiger/src/conn/conn_cache_pool.c @@ -509,7 +509,7 @@ __cache_pool_assess(WT_SESSION_IMPL *session, uint64_t *phighest) if (cache->cp_pass_pressure > highest) highest = cache->cp_pass_pressure; - __wt_verbose(session, WT_VERB_SHARED_CACHE, + __wt_verbose_debug2(session, WT_VERB_SHARED_CACHE, "Assess entry. reads: %" PRIu64 ", app evicts: %" PRIu64 ", app waits: %" PRIu64 ", pressure: %" PRIu64, reads, app_evicts, app_waits, cache->cp_pass_pressure); @@ -569,7 +569,7 @@ __cache_pool_adjust(WT_SESSION_IMPL *session, uint64_t highest, uint64_t bump_th pressure = cache->cp_pass_pressure / highest_percentile; busy = __wt_eviction_needed(entry->default_session, false, true, &pct_full); - __wt_verbose(session, WT_VERB_SHARED_CACHE, + __wt_verbose_debug2(session, WT_VERB_SHARED_CACHE, "\t%5" PRIu64 ", %3" PRIu64 ", %2" PRIu32 ", %d, %2.3f", entry->cache_size >> 20, pressure, cache->cp_skip_count, busy, pct_full); @@ -666,7 +666,7 @@ __cache_pool_adjust(WT_SESSION_IMPL *session, uint64_t highest, uint64_t bump_th entry->cache_size -= adjustment; cp->currently_used -= adjustment; } - __wt_verbose(session, WT_VERB_SHARED_CACHE, "Allocated %s%" PRIu64 " to %s", + __wt_verbose_debug2(session, WT_VERB_SHARED_CACHE, "Allocated %s%" PRIu64 " to %s", grow ? "" : "-", adjustment, entry->home); /* diff --git a/src/third_party/wiredtiger/src/conn/conn_tiered.c b/src/third_party/wiredtiger/src/conn/conn_tiered.c index 02a0f92a628..f75767d7691 100644 --- a/src/third_party/wiredtiger/src/conn/conn_tiered.c +++ b/src/third_party/wiredtiger/src/conn/conn_tiered.c @@ -53,14 +53,15 @@ __tier_storage_remove_local(WT_SESSION_IMPL *session) break; WT_ERR(__wt_tiered_name( session, &entry->tiered->iface, entry->id, WT_TIERED_NAME_OBJECT, &object)); - __wt_verbose(session, WT_VERB_TIERED, "REMOVE_LOCAL: %s at %" PRIu64, object, now); + __wt_verbose_debug2(session, WT_VERB_TIERED, "REMOVE_LOCAL: %s at %" PRIu64, object, now); WT_PREFIX_SKIP_REQUIRED(session, object, "object:"); /* * If the handle is still open, it could still be in use for reading. In that case put the * work unit back on the work queue and keep trying. */ if (__wt_handle_is_open(session, object)) { - __wt_verbose(session, WT_VERB_TIERED, "REMOVE_LOCAL: %s in USE, queue again", object); + __wt_verbose_debug2( + session, WT_VERB_TIERED, "REMOVE_LOCAL: %s in USE, queue again", object); WT_STAT_CONN_INCR(session, local_objects_inuse); /* * FIXME-WT-7470: If the object we want to remove is in use this is the place to call @@ -75,7 +76,8 @@ __tier_storage_remove_local(WT_SESSION_IMPL *session) entry->op_val = now + entry->tiered->bstorage->retain_secs; __wt_tiered_push_work(session, entry); } else { - __wt_verbose(session, WT_VERB_TIERED, "REMOVE_LOCAL: actually remove %s", object); + __wt_verbose_debug2( + session, WT_VERB_TIERED, "REMOVE_LOCAL: actually remove %s", object); WT_STAT_CONN_INCR(session, local_objects_removed); WT_ERR(__wt_fs_remove(session, object, false)); /* diff --git a/src/third_party/wiredtiger/src/evict/evict_lru.c b/src/third_party/wiredtiger/src/evict/evict_lru.c index 63fa232bd39..fd7512460eb 100644 --- a/src/third_party/wiredtiger/src/evict/evict_lru.c +++ b/src/third_party/wiredtiger/src/evict/evict_lru.c @@ -237,12 +237,12 @@ __wt_evict_server_wake(WT_SESSION_IMPL *session) conn = S2C(session); cache = conn->cache; - if (WT_VERBOSE_ISSET(session, WT_VERB_EVICTSERVER)) { + if (WT_VERBOSE_LEVEL_ISSET(session, WT_VERB_EVICTSERVER, WT_VERBOSE_DEBUG_2)) { uint64_t bytes_inuse, bytes_max; bytes_inuse = __wt_cache_bytes_inuse(cache); bytes_max = conn->cache_size; - __wt_verbose(session, WT_VERB_EVICTSERVER, + __wt_verbose_debug2(session, WT_VERB_EVICTSERVER, "waking, bytes inuse %s max (%" PRIu64 "MB %s %" PRIu64 "MB)", bytes_inuse <= bytes_max ? "<=" : ">", bytes_inuse / WT_MEGABYTE, bytes_inuse <= bytes_max ? "<=" : ">", bytes_max / WT_MEGABYTE); @@ -310,11 +310,11 @@ __wt_evict_thread_run(WT_SESSION_IMPL *session, WT_THREAD *thread) F_ISSET(thread, WT_THREAD_RUN)) __wt_yield(); else { - __wt_verbose(session, WT_VERB_EVICTSERVER, "%s", "sleeping"); + __wt_verbose_debug2(session, WT_VERB_EVICTSERVER, "%s", "sleeping"); /* Don't rely on signals: check periodically. */ __wt_cond_auto_wait(session, cache->evict_cond, did_work, NULL); - __wt_verbose(session, WT_VERB_EVICTSERVER, "%s", "waking"); + __wt_verbose_debug2(session, WT_VERB_EVICTSERVER, "%s", "waking"); } } else WT_ERR(__evict_lru_pages(session, false)); @@ -731,7 +731,7 @@ __evict_pass(WT_SESSION_IMPL *session) if (!__evict_update_work(session)) break; - __wt_verbose(session, WT_VERB_EVICTSERVER, + __wt_verbose_debug2(session, WT_VERB_EVICTSERVER, "Eviction pass with: Max: %" PRIu64 " In use: %" PRIu64 " Dirty: %" PRIu64, conn->cache_size, cache->bytes_inmem, cache->bytes_dirty_intl + cache->bytes_dirty_leaf); @@ -2061,7 +2061,7 @@ fast: *slotp += (u_int)(evict - start); WT_STAT_CONN_INCRV(session, cache_eviction_pages_queued, (u_int)(evict - start)); - __wt_verbose(session, WT_VERB_EVICTSERVER, "%s walk: seen %" PRIu64 ", queued %" PRIu64, + __wt_verbose_debug2(session, WT_VERB_EVICTSERVER, "%s walk: seen %" PRIu64 ", queued %" PRIu64, session->dhandle->name, pages_seen, pages_queued); /* -- cgit v1.2.1