summaryrefslogtreecommitdiff
path: root/src/include/cache.i
AgeCommit message (Collapse)Author
2014-08-13Add a new per-session flag, WT_SESSION_CAN_WAIT, and only use sessionsKeith Bostic
with that flag, and which are not holding the schema or lsm-tree locks, are used by the to make block-manager fsync calls based on os_cache_dirty configurations. Sessions that take the flag: application checkpoint, checkpoint server, eviction workers (and eviction primary if there are no eviction workers) and handle sweep server. Reference #1152.
2014-07-15Simplify bulk-load flags vs. eviction, make it bulk-load's problem,Keith Bostic
not eviction's. Eviction doesn't look at files that aren't open (WT_DHANDLE_OPEN not set), which I believe means WT_BTREE.root.page should never be NULL. Further, eviction shouldn't know anything about bulk-load, remove the bulk-load test, we'll use the WT_BTREE_NO_EVICTION instead. Change the btree open function to set WT_BTREE_NO_EVICTION on an empty object, at the same time we set the "bulk load is possible" flag. As soon as a row is inserted in the object, the bulk-load flag is turned off, change the object's eviction status at the same time. Change the cache-full check to skip checking the bulk-load flag, all that needs checking is the eviction flag. Minor paranoia change: don't let eviction be configured on the metadata file.
2014-06-27Don't wait between pages when evicting multiple pages in cache full check.Alex Gorrod
Otherwise application threads will wait to be notified by the server between each page eviction. This improves read throughput by ~5% in #1068
2014-06-25comment typoKeith Bostic
2014-06-24Slightly shuffle some code in __wt_cache_full_check() to minimize theKeith Bostic
work. I don't see a performance improvement, but doing extra work and reading global transactional information isn't making read-only loads faster.
2014-01-07Update copyright notices for 2014.Keith Bostic
Move lang/java and lang/python into the public domain.
2013-12-10Avoid bouncing the session cursor count between zero and one when searching ↵Michael Cahill
an LSM tree: increment the session's cursor count at the beginnging of an LSM search and decrement at the end. This also means we can get rid of the special purpose "cache busy" flag.
2013-11-26Back out the change to spin in eviction before waiting: it doesn't seem to ↵Michael Cahill
help in automated tests.
2013-11-26Tweak eviction: wait longer if not busy, but not for a specific cache ↵Michael Cahill
target: some threads may get stuck doing eviction while other threads keep reading pages. Also spin a few times before waiting on a condition variable: the latter is slow.
2013-11-26When stuck in eviction, re-check if a thread should be in "busy" mode. Be ↵Michael Cahill
consistent about the eviction target: when on an API boundary, wait until there is 5% cache available.
2013-11-15Fix hangs in eviction: we're also "busy" if we have a running transaction or ↵Michael Cahill
hazard pointers.
2013-11-13Once we enter an LSM tree, we are "busy" for the purposes of cache full checks.Michael Cahill
2013-11-08Only consider eviction "busy" if there are updates in progress.Michael Cahill
refs #754
2013-11-08Avoid division by zero if the cache size has not yet been set in a shared cache.Michael Cahill
2013-11-08Don't block the oldest reader in the system forever. Try harder to evict ↵Michael Cahill
when we aren't keeping the oldest ID pinned. refs #754
2013-11-05Get a read lock during __wt_lsm_tree_worker to avoid racing.Michael Cahill
We could use `__lsm_copy_chunks` instead if this change causes measurable contention. refs #748
2013-11-05Add a comment about the cache full percentage calculation.Michael Cahill
2013-11-05lint: implicit conversion loses integer precisionMichael Cahill
2013-11-05Try to evict if the cache is nearly full and we are at the API boundary.Michael Cahill
2013-11-04Fix a few potential performance problems in eviction.Michael Cahill
Application threads should only do eviction when the cache is full(!). Don't rely on reading the number of candidates before getting the lock. Set "disk_snap_txn" even if eviction fails, don't retry until the oldest ID has moved forwards.
2013-10-01Semantic sugar.Keith Bostic
Inline __wt_cache_bytes_dirty() and __wt_cache_pages_dirty(), there's no policy of not directly accessing WT_CACHE fields, and that's all they do. Remove comments about 8B vs. 4B atomic read/write and "special" code in __wt_cache_pages_inuse() and __wt_cache_bytes_inuse(), WiredTiger requires 8B atomic read/write, the comments no longer make any sense.
2013-08-21Rewrite S2BT to avoid lots of "dereference of a null pointer" warnings from ↵Michael Cahill
clang-analyzer.
2013-08-20whitespaceMichael Cahill
2013-08-20lintMichael Cahill
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-24Be less aggressive about exiting cache full check early.Alex Gorrod
2013-04-23Only evict a single page from __cursor_leave to avoid latency spikes.Alex Gorrod
2013-03-25Merge branch 'develop' into data-handlesMichael Cahill
Conflicts: src/btree/bt_evict.c src/btree/bt_handle.c src/btree/bt_page.c src/btree/rec_evict.c src/conn/conn_dhandle.c src/cursor/cur_stat.c src/include/btree.h src/include/btree.i src/include/stat.h src/lsm/lsm_cursor.c src/schema/schema_create.c src/txn/txn_ckpt.c
2013-03-25Merge branch 'develop' into data-handlesMichael Cahill
Conflicts: dist/filelist src/block/block_mgr.c src/btree/bt_cell.c src/btree/bt_curnext.c src/btree/bt_curprev.c src/btree/bt_debug.c src/btree/bt_evict.c src/btree/bt_handle.c src/btree/bt_slvg.c src/btree/bt_stat.c src/btree/bt_vrfy.c src/btree/bt_vrfy_dsk.c src/btree/rec_write.c src/btree/row_srch.c src/conn/conn_dhandle.c src/cursor/cur_file.c src/cursor/cur_index.c src/cursor/cur_stat.c src/include/api.h src/include/btree.h src/include/btree.i src/include/cache.i src/include/extern.h src/include/serial.i src/include/stat.h src/include/wt_internal.h src/lsm/lsm_cursor.c src/lsm/lsm_worker.c src/meta/meta_track.c src/schema/schema_drop.c src/schema/schema_plan.c src/schema/schema_truncate.c src/session/session_api.c src/session/session_dhandle.c src/txn/txn_ckpt.c
2013-03-02My last attempt to fix a race in forcing eviction didn't work, try again.Michael Cahill
2013-03-02Allow a cache full check without a btree handle.Michael Cahill
2013-02-06Remove support for the no-cache configuration, revert back to maintainingKeith Bostic
only a pair of hazard pointers at most (a parent/child pair), rather than the full stack of hazard pointers (one per level of the tree).
2013-01-31Merge branch 'develop' into sue.branchSusan LoVerso
Conflicts: src/btree/bt_evict.c
2013-01-31Add __wt_cache_pages_dirty and make naming consistent.Susan LoVerso
Add calls to functions where needed.
2013-01-03__wt_cache_full_check() can't have a NULL btree handle.Keith Bostic
2013-01-01Update copyright notice to 2013.Keith Bostic
2012-12-07Change __wt_cond_wait and __wt_cond_signal to return error values,Keith Bostic
instead of aborting.
2012-11-30Fix logic error in eviction loop.Michael Cahill
refs #242
2012-11-23Merge branch 'develop' into trickleAlex Gorrod
2012-11-22Add partial implementation for tracking dirty pages in cache.Alex Gorrod
2012-11-16Don't automatically fail inserts if the write generation check fails: ↵Michael Cahill
compare keys instead.
2012-11-16Add a session flag to disable cache checks in critical sections.Michael Cahill
2012-10-18Don't stop evicting until we reach the target, have eviction wake up ↵Michael Cahill
periodically regardless of whether the application signals it. This latter requires a "timed condition wait" operation.
2012-10-10If looping waiting for the cache to become empty, wake the eviction thread ↵Michael Cahill
periodically.
2012-10-10Don't wait for eviction when bulk loading or updating a file configured for ↵Michael Cahill
no eviction.
2012-10-10Cope if there is no btree set in the session when checking for eviction, do ↵Michael Cahill
the same check for all flavors of transactional update.
2012-10-10Move the eviction check to before an update starts, rather than after it is ↵Michael Cahill
holding hazard references.
2012-09-27Merge branch 'develop' into data-handlesMichael Cahill
Conflicts: src/btree/bt_handle.c src/conn/conn_dhandle.c src/cursor/cur_file.c src/include/btree.h src/include/cache.i src/include/extern.h src/lsm/lsm_worker.c src/session/session_dhandle.c src/support/hazard.c
2012-09-26fix a couple of lint warnings.Keith Bostic