Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Feb 7, 2015
  1. @dormando

    basic lock around hash_items counter

    dormando authored
    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.
Commits on Dec 28, 2014
  1. @dormando

    Pause all threads while swapping hash table.

    dormando authored
    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:
    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`
Commits on Apr 17, 2014
  1. @dormando

    Make hash table algorithm selectable

    dormando authored
    jenkins hash is old. Lets try murmur3 to start! Default is the old one, so
    people aren't surprised.
Commits on Sep 3, 2012
  1. @dormando

    don't wait on condition without holding the lock

    dormando authored
    freebsd9 is the only platform that apparently cares about this.
  2. @dormando

    item locks now lock hash table buckets

    dormando authored
    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.
Commits on Jul 30, 2012
  1. @dormando

    call mutex_unlock() when we use mutex_lock()

    dormando authored
    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.
Commits on Nov 10, 2011
  1. @dormando

    move hash calls outside of cache_lock

    dormando authored
    been hard to measure while using the intel hash (since it's very fast), but
    should help with the software hash.
  2. @dormando

    Use spinlocks for main cache lock

    dormando authored
    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.
Commits on Sep 28, 2011
  1. @dormando

    Allow setting initial size of the hash table

    dormando authored
    Instances which run many millions of items can now have its hash table
    presized. This can avoid some minor memory churn during the warmup
  2. @dormando

    expose stats for the internal hash table

    dormando authored
    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.
Something went wrong with that request. Please try again.