From da46a2ac48cc1671da587bad4db6c5ecd4a2c443 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Wed, 26 Sep 2018 02:03:31 -0700 Subject: [PATCH] ircd::db: Do our own default sharding calc based on request context contention. --- ircd/db.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ircd/db.cc b/ircd/db.cc index 23806d2bb..66654a9bf 100644 --- a/ircd/db.cc +++ b/ircd/db.cc @@ -2219,9 +2219,9 @@ noexcept decltype(ircd::db::database::cache::DEFAULT_SHARD_BITS) ircd::db::database::cache::DEFAULT_SHARD_BITS -{ - -1 -}; +( + std::min(std::log2(size_t(db::request_pool_size)), 8.0) +); decltype(ircd::db::database::cache::DEFAULT_STRICT) ircd::db::database::cache::DEFAULT_STRICT