| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
high level locks (#3086)
* WT-2955 Add statistics tracking the amount of time threads spend waiting for high level locks
Sort the statistics categories so it's easier to find stuff, no real change.
* Add counters and usec wait times to long-term locks (currently the
checkpoint, handle-list, metadata, schema and table locks).
* mutex.i:295:26: error: conversion to int64_t {aka long int} from long
unsigned int may change the sign of the result [-Werror=sign-conversion]
[t->slot_usecs] += WT_TIMEDIFF_US(leave, enter);
* Rename the lock statistics so they group together.
Split lock wait times between internal and application threads.
* Separate the connection's dummy session initialization out into its own
function, that way it's clear what we're doing.
* The session's connection statistics are fixed when the session ID is
allocated, so we can cache a pointer to them and avoid u_int divisions
(which are currently about the slowest thing you can do on a modern
architecture).
* A slightly different change: instead of caching a reference to the
connection statistics, cache the offset into the array of statistics
pointers, that way we can avoid the integer division when updating
almost all statistics.
* Review comments:
Add comments describing the use of statistics array offsets in lock
tracking.
Rename WT_STATS_FIELD_TO_SLOT to WT_STATS_FIELD_TO_OFFSET.
Whitespace cleanup.
* __wt_cache_create() doesn't need to call __wt_cache_destroy() explicitly,
if the connection open fails at any point, __wt_cache_destroy() will be
called as part of that cleanup.
* Append the suffix "_off" to the spinlock structure statistics field
names, clarify they're offsets into the statistics structures.
|
| |
|
|
|
|
|
|
|
|
|
| |
* WT-2949 Add option to skip closing the connection after test runs.
* Reverse the default value per review comments and add where needed to
configs.
* Add additional text/comments for new option.
|
| |
|
|
|
| |
This is not a bug fix, it's a change to make the code safer against future misuse.
|
|
|
|
| |
(#3085)
|
|
|
|
|
|
|
|
|
|
|
| |
is stuck (#3088)
Try to evict pages that exceed memory_page_max even if the transaction ID isn't increasing.
Workloads that insert large values checking only for the transaction ID moving forward can lead to very large in-memory pages. Allow the page to exceed the split size, but not the configured maximum.
Skipping such pages is a performance optimization - allow the optimization to work as long as pages are between split size and maximum size.
Also don't require so many entries on a leaf page to trigger a split when there are large values.
|
|
|
|
|
|
|
|
|
|
|
| |
../src/evict/evict_lru.c:1081:29: error: implicit conversion loses integer precision: 'unsigned long long' to 'u_int' (aka 'unsigned int') [-Werror,-Wshorten-64-to-32]
WT_MIN(max_entries, 1 + __wt_cache_pages_inuse(cache) / 2);
~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/include/misc.h:62:42: note: expanded from macro 'WT_MIN'
^
../src/evict/evict_lru.c:1084:29: error: implicit conversion loses integer precision: 'unsigned long long' to 'u_int' (aka 'unsigned int') [-Werror,-Wshorten-64-to-32]
WT_MIN(max_entries, 1 + cache->pages_dirty_leaf / 2);
~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/include/misc.h:62:42: note: expanded from macro 'WT_MIN'
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
current queue. (#3071)
Along with a number of other changes to avoid pathological cases with tiny caches:
Application threads should do urgent eviction if there is only one eviction worker.
Always alternate the "fill queue", so that once a walk has tried to fill one queue, it keeps evicting from the other.
If there are tiny numbers of candidate pages, only allow half in each queue to avoid situations where all candidates are in one queue.
If there is only one candidate page in the whole cache, it had better get queued.
Don't allow the eviction server to sit on pages requiring urgent eviction.
|
|
|
|
|
|
|
| |
(#3069)
Only available for in-memory configurations, designed to be used for
applications that maintain a small amount of content that is required
for correctness.
|
|
|
| |
If a system call to retrieve a timestamp fails it will now result in a panic. We couldn't find any case where that's a real possibility.
|
|
|
| |
This saves locking and scanning the list of active handles for read-only workloads, which can be time consuming when there are many tables.
|
|
|
| |
Gcc/clang both take - to mean stdin, get rid of the temporary file.
|
|
|
|
|
|
|
|
|
| |
* WT-2920 New eviction statistics
Add "application_eviction" statistic, the usecs application threads
spent doing eviction.
* Add a finer grained timer around eviction as well.
|
|
|
|
|
|
|
|
| |
The OS X cpp program injects line number output in the middle of lines
and doesn't stringify #XXX entries; use the -E option to the compiler
instead.
The OS X C pre-processor won't take input from stdin, use a temporary
source file.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
* WT-2942 Verbose messages should not have newlines.
* Fix another set of ERR/RET macros and __wt_verbose calls including newline
characters.
|
|
|
|
| |
scan threads. (#3066)
|
|
|
| |
Mostly in order to allow valgrind runs with make check to finish in a reasonable time.
|
|
|
|
| |
Also replace key-string generation implementation with a more efficient implementation.
|
|
|
| |
Reverts commit ac1f7401dcb8be345973f7787d9121c5c321bf7b.
|
| |
|
| |
|
|
|
| |
There are some configurations where the eviction server waiting for a the current queue to drain before switching in the new queue can lead to starvation. Specifically if in-memory is configured, the cache is full and there is only a single eviction thread. Or if an operation that does not contribute to eviction fills the cache (for example compact).
|
| |
|
|
|
|
|
|
| |
* Set WT_CACHE_EVICT_XXX when setting WT_CACHE_EVICT_XXX_HARD (the byte count checks can race, so we have to explicitly set both).
* Make WT_CACHE.pages_evict volatile: loops in __evict_pass() and __wt_cache_eviction_worker() read the value and depend on it being updated when subsequently read.
|
|
|
| |
Fix a bug in scrub step down, where it could set the target below the eviction target leading to an unexpected eviction state.
|
|
|
| |
We were forcing them to return an exit code of 0.
|
|
|
| |
Don't unlock the spin lock unless we've locked it.
|
|
|
|
|
| |
WT_THREAD_PANIC_FAIL is a WT_THREAD structure flag, but is declared
elsewhere, likely to introduce a bug if additional flags are added to
the WT_THREAD structure.
|
|
|
|
|
|
|
| |
Set an alarm when running reconfiguration tests so we can detect hangs;
if the alarm goes off, output the current configuration string and drop
core.
We've seen cases where reconfiguring causes a hang, but haven't been able to identify the root cause.
|
|
|
| |
We can't look at the WT_REF address without some kind of lock as the address can change underneath us. For example, if we take a copy of WT_REF.addr.addr while it's referencing an on-page cell, and then the page is evicted before we crack that address, we'll potentially read freed memory. Lock down the WT_REF before reading the address.
|
|
|
| |
The test relies on operating without eviction.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* WT-2918 the dist scripts create C files s_whitespace complains about
s_export doesn't need to create a .c file.
enhance a comment to explain the loop.
* The s_tags script creates a .c file that s_whitespace doesn't like,
use a standard source file for the ctags flag test.
At the end of the script, remove the tags file created in the dist
directory.
Include source files deeper than 1 directory below src/ so we get
src/checksum/XXX.
Don't redirect the "skipping ctags" message to the tags file, that
means it never gets seen.
* Fixing the bug that kept the s_tags "skipped" message from showing
up broke s_all, add s_tags to the exclusion list.
* Don't overwrite the local tags file if we're run in the wrong directory.
Exit 0 on success, 1 on error.
|
| |
|
|
|
|
|
| |
* Don't relax the clean / dirty requirements when we get aggressive: if application threads are blocked by the dirty limit, evicting a clean page doesn't unblock them so there's no point trying.
* Sanity check dirty eviction limits: once the cache is full, we should evict both clean and dirty pages.
|
| |
|
| |
|
|
|
|
|
|
| |
We could be in a situation with a tiny number of pages in cache, all of
which are already queued. The queue needs to be re-sorted so that some
of those entries can become candidates. This caused hangs in some
test/format configs.
|
|
|
|
| |
satisfy some linkers (#3040)
|
|
|
|
|
|
|
| |
Having _FAST_ macros gives an impression that when we use them,
we are collecting fast statistics only, which is not true.
Except when statistics=none is set, we collect all the stats.
This change removes _FAST_ macros and modifies the basic macros
to only collect stats when statistics=none is not set.
|
|
|
|
|
|
|
|
|
| |
Some workloads create "deserts" within a tree where no good eviction
candidates can be found (e.g., zipfian distributions, append-only
workloads, etc.). Rather than walking all the way through such
regions, give up and try in the opposite direction next time.
Also add a statistic for the eviction empty score.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* WT-2911 add support for gcc6
* Turn on stronger clang flags except for Apple's clang 4.1.
Another run at getting the quoting right.
* rebalance.c:81:2: error: embedding a directive within macro arguments
has undefined behavior [-Werror,-Wembedded-directive]
* Remove double quotes around string in case statements, it makes bash sad.
|
|
|
|
|
|
|
|
| |
gcc 4.8.5 on the zseries (incorrectly) thinks callers of
__wt_block_write_off() can use uninitialized size, offset and checksum
returns, but those variables are only left uninitialized on error return.
gcc 4.8.5 (Red Hat 4.8.5-4)
Linux rhel72-z-wt.novalocal 3.10.0-327.4.4.el7.s390x #1 SMP Thu Dec 17 15:52:10 EST 2015 s390x s390x s390x GNU/Linux
|