From 2063efb22c3c29b980f86f7fee77b6d03ba63ec1 Mon Sep 17 00:00:00 2001 From: Keith Bostic Date: Fri, 23 Jan 2015 16:21:06 -0500 Subject: Two "real" changes: Don't count pages evicted by a worker thread as an "application thread" eviction; add a new statistic to distinguish between the server itself evicting pages and the eviction worker threads evicting. Don't increment the eviction counters unless we find a page to evict, __evict_lru_pages() gets called a huge number of times in any workload where eviction is happening. Discussion: The "is_app" flag is being used for a few purposes: - if we should perform the "oldest transaction in the system" test, - if the evictor thread is the eviction server, - if the "eviction by an application thread" counter should be incremented, - if the session's split generation can be non-zero after eviction. Move the "oldest transaction in the system" test outside of the eviction code, and do that test before trying to evict a page (this required moving __wt_txn_am_oldest() from include/txn.i (an inlined function) into txn/txn.c (a real function). Replace the "is_app" flag with an "is_server" flag to distinguish between the eviction server and eviction work threads (we can distinguish between application threads and worker/server threads using the WT_SESSION_INTERNAL flag in the WT_SESSION handle). Reference SERVER-16997, SERVER-17020. --- dist/stat_data.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dist') diff --git a/dist/stat_data.py b/dist/stat_data.py index 69e8d2ed21e..3a75605d570 100644 --- a/dist/stat_data.py +++ b/dist/stat_data.py @@ -182,6 +182,8 @@ connection_stats = [ 'eviction server unable to reach eviction goal'), CacheStat('cache_eviction_split', 'pages split during eviction'), CacheStat('cache_eviction_walk', 'pages walked for eviction'), + CacheStat('cache_eviction_worker_evicting', + 'eviction worker thread evicting pages'), CacheStat('cache_inmem_split', 'in-memory page splits'), CacheStat('cache_pages_dirty', 'tracked dirty pages in the cache', 'no_scale'), -- cgit v1.2.1