mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Make I/O and prefetch worker threads configurable
This commit is contained in:
committed by
Nik Bougalis
parent
6746b863b3
commit
cf97dcb992
@@ -246,6 +246,10 @@ public:
|
||||
#if RIPPLE_SINGLE_IO_SERVICE_THREAD
|
||||
return 1;
|
||||
#else
|
||||
|
||||
if (config.IO_WORKERS > 0)
|
||||
return config.IO_WORKERS;
|
||||
|
||||
auto const cores = std::thread::hardware_concurrency();
|
||||
|
||||
// Use a single thread when running on under-provisioned systems
|
||||
@@ -342,7 +346,8 @@ public:
|
||||
m_collectorManager->collector(),
|
||||
logs_->journal("Resource")))
|
||||
|
||||
, m_nodeStore(m_shaMapStore->makeNodeStore(4))
|
||||
, m_nodeStore(m_shaMapStore->makeNodeStore(
|
||||
config_->PREFETCH_WORKERS > 0 ? config_->PREFETCH_WORKERS : 4))
|
||||
|
||||
, nodeFamily_(*this, *m_collectorManager)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user