This repository was archived by the owner on Sep 27, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -31,13 +31,14 @@ namespace peloton {
31
31
ThreadPool thread_pool;
32
32
33
33
void PelotonInit::Initialize () {
34
- CONNECTION_THREAD_COUNT = std::thread::hardware_concurrency ();
34
+ CONNECTION_THREAD_COUNT = settings::SettingsManager::GetInt (
35
+ settings::SettingId::connection_thread_count);
35
36
LOGGING_THREAD_COUNT = 1 ;
36
37
GC_THREAD_COUNT = 1 ;
37
38
EPOCH_THREAD_COUNT = 1 ;
38
39
39
40
// set max thread number.
40
- thread_pool.Initialize (0 , std::thread::hardware_concurrency () + 3 );
41
+ thread_pool.Initialize (0 , CONNECTION_THREAD_COUNT + 3 );
41
42
42
43
// start worker pool
43
44
threadpool::MonoQueuePool::GetInstance ().Startup ();
@@ -47,7 +48,7 @@ void PelotonInit::Initialize() {
47
48
threadpool::MonoQueuePool::GetBrainInstance ().Startup ();
48
49
}
49
50
50
- int parallelism = (std::thread::hardware_concurrency () + 3 ) / 4 ;
51
+ int parallelism = (CONNECTION_THREAD_COUNT + 3 ) / 4 ;
51
52
storage::DataTable::SetActiveTileGroupCount (parallelism);
52
53
storage::DataTable::SetActiveIndirectionArrayCount (parallelism);
53
54
Original file line number Diff line number Diff line change @@ -97,6 +97,11 @@ SETTING_int(monoqueue_worker_pool_size,
97
97
4 ,
98
98
false , false )
99
99
100
+ // Number of connection threads used by peloton
101
+ SETTING_int(connection_thread_count,
102
+ " Number of connection threads (default: std::hardware_concurrency())" ,
103
+ std::thread::hardware_concurrency (), false, false)
104
+
100
105
// ===----------------------------------------------------------------------===//
101
106
// WRITE AHEAD LOG
102
107
// ===----------------------------------------------------------------------===//
You can’t perform that action at this time.
0 commit comments