mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-26 14:05:51 +00:00
On non-tiny nodes, use an extra I/O thread.
This commit is contained in:
@@ -46,7 +46,7 @@ DatabaseCon::~DatabaseCon()
|
|||||||
}
|
}
|
||||||
|
|
||||||
Application::Application() :
|
Application::Application() :
|
||||||
// mIOService(2),
|
mIOService((theConfig.NODE_SIZE >= 2) ? 2 : 1),
|
||||||
mIOWork(mIOService), mAuxWork(mAuxService), mUNL(mIOService), mNetOps(mIOService, &mLedgerMaster),
|
mIOWork(mIOService), mAuxWork(mAuxService), mUNL(mIOService), mNetOps(mIOService, &mLedgerMaster),
|
||||||
mTempNodeCache("NodeCache", 16384, 90), mHashedObjectStore(16384, 300), mSLECache("LedgerEntryCache", 4096, 120),
|
mTempNodeCache("NodeCache", 16384, 90), mHashedObjectStore(16384, 300), mSLECache("LedgerEntryCache", 4096, 120),
|
||||||
mSNTPClient(mAuxService), mJobQueue(mIOService), mFeeTrack(),
|
mSNTPClient(mAuxService), mJobQueue(mIOService), mFeeTrack(),
|
||||||
@@ -100,6 +100,12 @@ static void runAux(boost::asio::io_service& svc)
|
|||||||
svc.run();
|
svc.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void runIO(boost::asio::io_service& io)
|
||||||
|
{
|
||||||
|
NameThread("io");
|
||||||
|
io.run();
|
||||||
|
}
|
||||||
|
|
||||||
void Application::setup()
|
void Application::setup()
|
||||||
{
|
{
|
||||||
mJobQueue.setThreadCount();
|
mJobQueue.setThreadCount();
|
||||||
@@ -307,6 +313,11 @@ void Application::setup()
|
|||||||
|
|
||||||
void Application::run()
|
void Application::run()
|
||||||
{
|
{
|
||||||
|
if (theConfig.NODE_SIZE >= 2)
|
||||||
|
{
|
||||||
|
boost::thread(boost::bind(runIO, boost::ref(mIOService))).detach();
|
||||||
|
}
|
||||||
|
|
||||||
mIOService.run(); // This blocks
|
mIOService.run(); // This blocks
|
||||||
|
|
||||||
if (mWSPublicDoor)
|
if (mWSPublicDoor)
|
||||||
|
|||||||
Reference in New Issue
Block a user