diff options
author | dormando <dormando@rydia.net> | 2021-05-03 19:08:02 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2021-06-09 16:02:14 -0700 |
commit | 79d996979824ca974188fc589ed52f6fc0b21aeb (patch) | |
tree | 6d832f3d384187284b6f8e1a3974a34e285bf98a /memcached.c | |
parent | 4481e4c831dc79058f9ce83046e1d6c53f14b912 (diff) | |
download | memcached-79d996979824ca974188fc589ed52f6fc0b21aeb.tar.gz |
hash: add XXH3 to list of hash algorithms.
needs more testing. in a "pure miss" test to help show hashing overhead,
with four worker threads and large ascii multigets there is a measurable
performance boost for longer keys. Very short keys (10-15 bytes) are
about even.
for 150ish byte keys 12m rps -> 13m rps roughly. Not too bad!
need to test hash table distribution for large sets of keys before
merging. need to consider if worth switching the defaults now or later.
Diffstat (limited to 'memcached.c')
-rw-r--r-- | memcached.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/memcached.c b/memcached.c index 54369cd..b6d4477 100644 --- a/memcached.c +++ b/memcached.c @@ -3872,7 +3872,7 @@ static void usage(void) { " forcefully killing LRU tail item.\n" " disabled by default; very dangerous option.\n" " - hash_algorithm: the hash table algorithm\n" - " default is murmur3 hash. options: jenkins, murmur3\n" + " default is murmur3 hash. options: jenkins, murmur3, xxh3\n" " - no_lru_crawler: disable LRU Crawler background thread.\n" " - lru_crawler_sleep: microseconds to sleep between items\n" " default is %d.\n" @@ -5080,8 +5080,10 @@ int main (int argc, char **argv) { hash_type = JENKINS_HASH; } else if (strcmp(subopts_value, "murmur3") == 0) { hash_type = MURMUR3_HASH; + } else if (strcmp(subopts_value, "xxh3") == 0) { + hash_type = XXH3_HASH; } else { - fprintf(stderr, "Unknown hash_algorithm option (jenkins, murmur3)\n"); + fprintf(stderr, "Unknown hash_algorithm option (jenkins, murmur3, xxh3)\n"); return 1; } break; |