quickstep-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zu...@apache.org
Subject [06/50] [abbrv] incubator-quickstep git commit: Increased the size of the sharded lock manager to a large primary number (#198)
Date Mon, 30 May 2016 23:18:41 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/5b75e8ec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/5b75e8ec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/5b75e8ec

Branch: refs/heads/work-order-serialization
Commit: 5b75e8ec24366e2379624804db9cb118cbe0bcd3
Parents: c5460f4
Author: Jignesh Patel <pateljm@users.noreply.github.com>
Authored: Thu Apr 28 16:11:22 2016 -0500
Committer: Zuyu ZHANG <zuyu@users.noreply.github.com>
Committed: Thu Apr 28 14:11:22 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/5b75e8ec/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