summaryrefslogtreecommitdiff
path: root/src/include/cache.h
AgeCommit message (Collapse)Author
2014-10-04We don't yet need anything other than single-byte versions of theKeith Bostic
atomic flag operations, simplify the world.
2014-08-29Fix some bugs in shared cache:Alex Gorrod
* It was possible for a balance pass to get into an infinite loop. * Remove an overlapping flag constant
2014-08-27Fix session management for shared caches.Alex Gorrod
* Each participant now has a manager thread * Each participant has a shared cache session Refs issue #1176
2014-08-05Merge branch 'develop' into dynamic-evict-workersAlex Gorrod
Conflicts: src/btree/bt_evict.c src/conn/conn_cache.c src/include/cache.h
2014-08-01Move eviction worker fields from cache into the connection, so they are ↵Michael Cahill
always available.
2014-08-01Move session creation out of worker threads: the session open can race with ↵Michael Cahill
connection close.
2014-07-31Start and stop eviction worker threads based on demand.Alex Gorrod
Refs #1116
2014-04-07Merge branch 'develop' into multiple-eviction-threadsMichael Cahill
Conflicts: src/btree/bt_evict.c
2014-04-01Revert 951ae8f, didn't mean to push.Michael Cahill
2014-04-01imported patch force-loopMichael Cahill
2014-03-29Experimental change: move the WT_PAGE.{parent,ref_hint} fields into theKeith Bostic
WT_REF structure.
2014-03-05Merge branch 'develop' into new-splitKeith Bostic
Conflicts: src/btree/bt_evict.c src/btree/bt_handle.c src/btree/bt_page.c src/btree/bt_slvg.c src/btree/bt_walk.c src/btree/col_srch.c src/btree/rec_write.c src/btree/row_srch.c src/config/config_def.c src/include/btree.i src/include/cache.h src/include/extern.h src/include/flags.h src/include/misc.h src/include/txn.i src/include/wiredtiger.in
2014-02-27Switch to using hazard references for walks through the cache.Michael Cahill
2014-02-26Merge branch 'develop' into new-splitKeith Bostic
Conflicts: src/btree/bt_evict.c src/include/cache.h
2014-02-20Remove WT_EVICT_INTERNAL, WT_EVICT_PASS_INTERNAL, no longer used.Keith Bostic
2014-02-20Only evict Bloom filter pages if eviction gets aggressive.Michael Cahill
2014-02-17Increase the skew against evicting internal pages: some wtperf workloads ↵Michael Cahill
cause excessive eviction. refs #829 (etc.)
2014-01-14Add a new mode to eviction that only considers internal pages.Alex Gorrod
The mode is triggered when we are force evicting pages, and the cache is not yet full. If we don't merge internal pages while doing forced eviction we can end up with very deep chains of WT_REC_SPLIT pages.
2014-01-07Update copyright notices for 2014.Keith Bostic
Move lang/java and lang/python into the public domain.
2013-10-25Revert to clearing all pages from the LRU queue: change ↵Michael Cahill
81d7c81584a1ffcc4d8b6912403c17ff97884767 fails this assertion: btree/bt_discard.c, 45: !F_ISSET_ATOMIC(page, WT_PAGE_EVICT_LRU) refs #735
2013-10-25Just use the dhandle for evict_file_next: that's just as unique as the name ↵Michael Cahill
pointer.
2013-10-24Merge branch 'develop' into evictKeith Bostic
Conflicts: src/include/cache.h
2013-10-24Remove WT_CACHE.force_entries, it's never used.Keith Bostic
2013-10-24Don't keep accumulating pages once we've hit max_entries, that'sKeith Bostic
supposed to limit the pages we acquire for the LRU queue. Replace the file counting mechanism for restarting at the same spot in the dhandle list with a reference to a field of the dhandle structure.
2013-10-17Add explicit active state to eviction server.Alex Gorrod
Used to limit when we clean up obsolete update lists.
2013-05-07Keep track of the maximum slot used in the LRU queue in a volatile, ↵Michael Cahill
monotonic variable, so we can never miss a page when scanning.
2013-04-24Changes to tune eviction loops based on profiling. Track more pages, but ↵Michael Cahill
only sort the maximum number of entries we have actually seen.
2013-04-24Introduce a condition variable for application threads waiting for evictionAlex Gorrod
candidates. Application eviction used to poll, but it's hard to get the polling interval right for all cases.
2013-04-24Move allocation and freeing of the LRU queue out of the eviction thread: ↵Michael Cahill
applications threads use it and there's no guarantee the eviction server has started.
2013-04-02Enhance forced eviction to allow multiple pages to be queued.Alex Gorrod
2013-03-07Fixes for the memory accounting of split-merge pages.Keith Bostic
The eviction server was using the cache_inuse routines on exit, which don't complain if there are more bytes/pages evicted than are in memory, and that's not correct, change it to do an exact comparison. This was hiding some problems in our page count. Fix the page count problems by: ... adding an "allocate a new WT_PAGE" function that increments the count of pages in the system and calling it from everywhere (we weren't counting split-merge pages created during reconciliation, or the pages we created when opening empty trees); ... change the split-merge collapse code to call __wt_page_out to discard pages instead of freeing them explicitly; ... rename WT_CACHE.pages_read to be pages_inmem, matching the bytes_inmem name and matching its new function of tracking all pages, no matter their origin. We were tracking cache "bytes in memory" in two variables: "bytes read" was tracked in WT_CACHE.bytes_read and "bytes subsequently added in memory" in WT_CACHE.bytes_inmem, and we added them together to get a final answer. Change WT_CACHE.bytes_inmem to be the bytes in memory, regardless of whether it was read in, a created page, or subsequently added memory, by removing WT_CACHE.bytes_read and changing the __wt_page_inmem function to call __wt_cache_page_inmem_incr instead of having a separate __wt_cache_page_read function. Change __wt_page_modify_init to increment the page's footprint when the WT_PAGE_MODIFY structure is first allocated. Add a reconciliation function to create split-merge pages: abstract out the common code and set the page's memory footprint.
2013-03-01Track eviction progress explicitly. Previously, we gave up if the cache ↵Michael Cahill
didn't get smaller, but with enough read pressure from application threads, that check was insufficient.
2013-02-28Deal with eviction getting stuck. Now that application threads don't try to ↵Michael Cahill
evict pages they have no chance of writing, there is no point counting failures in application threads. If the eviction server gives up without hitting its target, have the oldest transaction abort next time it tries to evict something.
2013-02-08Cleanup based on Keith's review feedback.Michael Cahill
2013-01-15line formattingKeith Bostic
2013-01-15Alter the shared cache min configuration to be called reserved.Alex Gorrod
Associated code changes, and some enhancements to the shared cache balancing algorithm.
2013-01-14Add the ability to specify a per-connection base size to participants inAlex Gorrod
a shared cache.
2013-01-04Merge branch 'develop' into evict-large-pagesMichael Cahill
Conflicts: src/btree/bt_evict.c src/include/cache.h
2013-01-01Merge branch 'develop' into dirty-disableKeith Bostic
2013-01-01Update copyright notice to 2013.Keith Bostic
2012-12-27Re-structure chunks of __bt_evict.c to make checkpoints outside of theKeith Bostic
eviction server thread work. I think I'm fixing two problems: First, the cache->disabled_eviction handling isn't sufficient (we were emptying the LRU queue, but we weren't waiting for it to drain). If a thread of control took a buffer off the LRU eviction queue and went to sleep, it would be possible for it to race with a thread of control during the internal-page phase of a checkpoint, and we can't allow any pages at all to be written after the internal-page checkpoint phase starts. The fix is to contact the eviction server at the start of the internal-page phase of a checkpoint and have it wait for the LRU queue to drain. Second, we can't discard any page with a modified structure during the internal-page checkpoint phase because that can race with the checkpoint threads looking at the WT_REF structure for the page being discarded, in other words, there's a state change in the internal page just when the internal page is being read. I also changed it so we don't turn off writes for the entire cache when doing the internal-page phase of a checkpoint, we only need to turn off writes for the file being checkpointed. Move WT_SYNC_XXX flags into dist/flags.py, they're no longer specific to an eviction server operation, they only place you see them all is in the __wt_bt_cache_flush() function. Reference #419.
2012-12-21Add code in to prioritize eviction of pages that are largerAlex Gorrod
than a certain threshold. This avoids taking a performance hit when a huge page needs to be reconciled.
2012-12-18Fixes from Alex's review: revert a test change made for debugging, and ↵Michael Cahill
switch from an on/off field to using the WT_EVICT_* flags to disable eviction of dirty pages.
2012-12-14When evicting in a file that is being checkpointed, only evict clean pages.Michael Cahill
2012-12-14Try to clear the LRU walk if waiting in the tree during a checkpoint.Michael Cahill
2012-11-22Add partial implementation for tracking dirty pages in cache.Alex Gorrod
2012-11-09Shared cache fixes from review. Fix connection::reconfigure API.Alex Gorrod
2012-11-08Manage a session handle for the cache pool thread. This becomesAlex Gorrod
complicated because the cache pool can live longer than the connection that initially creates it.
2012-11-08Merge branch 'develop' into shared-cacheAlex Gorrod
2012-11-07Add configuration string checking to subconfig options.Alex Gorrod
Update all uses of cache_size in our tree to be cache.size Update cache pool implementation to no longer have a quota option. Update cache pool implementation to have a minimum/initial size. Update subconfig documentation tags, so the doc looks OK.