| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
musl libc will warn if you include sys/signal.h instead of signal.h as
specified by posix. Build will fail due to -Werror explicitly beeing
set.
Fix it by use the posix location.
fixes #138
|
|
|
|
|
|
| |
could/should be an atomic. Previously all write mutations were wrapped with
cache_lock, but that's not the case anymore. Just enforce consistency around
the hash_items counter, which is used for hash table expansion.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We used to hold a global lock around all modifications to the hash table.
Then it was switched to wrapping hash table accesses in a global lock during
hash table expansion, set by notifying each worker thread to change lock
styles. There was a bug here which causes trylocks to clobber, due to the
specific item locks not being held during the global lock:
https://code.google.com/p/memcached/issues/detail?id=370
The patch previous to this one uses item locks during hash table expansion.
Since the item lock table is always smaller than the hash table, an item lock
will always cover both its new and old buckets.
However, we still need to pause all threads during the pointer swap and setup.
This patch pauses all background threads and worker threads, swaps the hash
table, then unpauses them.
This trades the (possibly significant) slowdown during the hash table copy,
with a short total hang at the beginning of each expansion. As previously;
those worried about consistent performance can presize the hash table with
`-o hashpower=n`
|
| |
|
|
|
|
|
| |
jenkins hash is old. Lets try murmur3 to start! Default is the old one, so
people aren't surprised.
|
|
|
|
| |
freebsd9 is the only platform that apparently cares about this.
|
|
|
|
|
|
|
|
|
|
| |
expansion requires switching to a global lock temporarily, so all buckets have
a covered read lock.
slab rebalancer is paused during hash table expansion.
internal item "trylocks" are always issued, and tracked as the hash power
variable can change out from under it.
|
|
|
|
|
| |
use both #define's when using the spinlock version of our locks. not all locks
are designed to be that way, so this doesn't touch the whole thing.
|
|
|
|
|
| |
been hard to measure while using the intel hash (since it's very fast), but
should help with the software hash.
|
|
|
|
|
|
|
| |
Partly by Ripduman Sohan
Appears to significantly help prevent performance dropoff from additional
threads, but only when the locks are frequently contested and are short.
|
|
|
|
|
|
| |
Instances which run many millions of items can now have its hash table
presized. This can avoid some minor memory churn during the warmup
period.
|
|
|
|
|
|
| |
Now users can tell how much memory is being used for the hash table structure.
It also exposes the current hash power level, which is useful for presizing
the structure.
|
|
|
|
| |
See: http://code.google.com/p/memcached/issues/detail?id=22
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
ICC pretends to be GCC as far as autoconf is concerned, but is
incompatible in a few ways.
ICC C99 mode fails to define u_char, so I made a small change to
modify that required c99 to work with ICC's C99 mode off. Nobody
wants to put effort into working around compilers that don't speak C99
in the long-term, but a one line change has already revealed quite a
few potential bugs.
|
|
|
|
|
|
|
| |
Previously we tried to migrate one bucket over to the new hash table before
we started a new command for a client, and we tried to lock the cache in order
to determine if we should move an item or not. This resulted in extra contention
on an already hot mutex...
|
| |
|
| |
|
|
|
|
|
| |
calloc is already used to resize the hash table, so it's good to be
consistent here.
|
|
|
|
| |
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@595 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
|
|
| |
expanded to bool
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@591 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
| |
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@551 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
| |
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@510 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
|
|
|
| |
new files, not the modified ones.)
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@509 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
| |
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@500 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
| |
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@496 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
| |
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@492 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
| |
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@468 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
| |
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@450 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
|
|
|
| |
Add byte-order check to the configure script (required for Jenkins2006).
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@412 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
window (when you specify a time parameter to the delete command, which
prevents adds/replaces for that many seconds)
in particular, if you had a small timeout, less than 5 seconds, then a
future add/replace which should've worked wouldn't because the
delete_timer wouldn't have run yet.
this has caused a lot of people just evalutating memcached and playing
around as they read the protocol docs to go crazy, as they couldn't
see the delete timer happening, and it all just appeared random to
them
this also unifies some duplicated code, and adds some assertions, in
particular in assoc_insert to make sure that key isn't already in the
hashtable.
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@337 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
| |
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@335 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
| |
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@330 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
| |
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@329 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
| |
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@328 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
| |
git-svn-id: http://code.sixapart.com/svn/memcached/trunk@95 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
| |
git-svn-id: http://code.sixapart.com/svn/memcached/trunk@56 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
| |
git-svn-id: http://code.sixapart.com/svn/memcached/trunk@53 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
| |
git-svn-id: http://code.sixapart.com/svn/memcached/trunk@35 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
|
|
|
|
|
|
|
|
| |
* removing use of Judy; use a hash. (judy caused memory fragmentation)
* shrink some structures
* security improvements
* version 1.1.0
git-svn-id: http://code.sixapart.com/svn/memcached/trunk@34 b0b603af-a30f-0410-a34e-baf09ae79d0b
|
|
uses our slab allocator.
git-svn-id: http://code.sixapart.com/svn/memcached/trunk@33 b0b603af-a30f-0410-a34e-baf09ae79d0b
|