diff options
author | dormando <dormando@rydia.net> | 2016-12-19 16:00:56 -0800 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2016-12-19 16:00:56 -0800 |
commit | 4dc24dcccd5df1bc0c00169434296075688d68e7 (patch) | |
tree | 4a8b1d22bc8b70bd1ba2219d5b8695279fddcfaf /thread.c | |
parent | 99b55790619a066212919a702fcd1e2bf9835fa2 (diff) | |
download | memcached-4dc24dcccd5df1bc0c00169434296075688d68e7.tar.gz |
scale item hash lock with more worker threads
the thread scalability is much higher than when the bucket count was tested.
Increasing this has a relatively small effect, but still worth adjusting.
More strict testing should be done to more properly scale the table; as well
ad adjusting for false-sharing issues given table entries that border each
other.
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -741,9 +741,13 @@ void memcached_thread_init(int nthreads) { power = 11; } else if (nthreads < 5) { power = 12; - } else { - /* 8192 buckets, and central locks don't scale much past 5 threads */ + } else if (nthreads <= 10) { power = 13; + } else if (nthreads <= 20) { + power = 14; + } else { + /* 32k buckets. just under the hashpower default. */ + power = 15; } if (power >= hashpower) { |