quickstep-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zu...@apache.org
Subject [23/30] incubator-quickstep git commit: Increased the size of the sharded lock manager to a large primary number (#198)
Date Thu, 05 May 2016 06:16:59 GMT
Increased the size of the sharded lock manager to a large primary number (#198)

Having small number of entries in the sharded lock manager introduces artificial conflict
causing the buffer pool to grow. The size of an entry in the lock_manager_ is small, so don't
be so stingy with the size of the lock manager. By default, we want to run well on large memory
boxes.

Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/ae3ca334
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/ae3ca334
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/ae3ca334

Branch: refs/heads/master
Commit: ae3ca334f11258cc34148e402336683ea9e6aecc
Parents: 517bf5e
Author: Jignesh Patel <pateljm@users.noreply.github.com>
Authored: Thu Apr 28 16:11:22 2016 -0500
Committer: Zuyu Zhang <zzhang@pivotal.io>
Committed: Wed May 4 23:15:35 2016 -0700

----------------------------------------------------------------------
 storage/StorageManager.hpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/ae3ca334/storage/StorageManager.hpp
----------------------------------------------------------------------
diff --git a/storage/StorageManager.hpp b/storage/StorageManager.hpp
index 0b68b76..52326c2 100644
--- a/storage/StorageManager.hpp
+++ b/storage/StorageManager.hpp
@@ -479,7 +479,11 @@ class StorageManager {
   //   (2) If it is not safe to evict a block, then either that block's
   //       reference count is greater than 0 or a shared lock is held on the
   //       block's lock shard.
-  static constexpr std::size_t kLockManagerNumShards = 256;
+  // TODO(jmp): Would be good to set this more intelligently in the future
+  //            based on the hardware concurrency, the amount of main memory
+  //            and slot size. For now pick the largest prime that is less
+  //            than 8K.
+  static constexpr std::size_t kLockManagerNumShards = 0x2000-1;
   ShardedLockManager<block_id, kLockManagerNumShards, SpinSharedMutex<false>>
lock_manager_;
 
   FRIEND_TEST(StorageManagerTest, DifferentNUMANodeBlobTestWithEviction);


Mime
View raw message