Dispatch HashedObject background writes through our job queue.

This commit is contained in:
JoelKatz
2013-01-28 07:13:05 -08:00
parent e9d405302c
commit e48ef29f8c
3 changed files with 9 additions and 7 deletions

View File

@@ -17,6 +17,7 @@ JobQueue::JobQueue() : mLastJob(0), mThreadCount(0), mShuttingDown(false)
mJobLoads[jtPROPOSAL_ut].setTargetLatency(500, 1250);
mJobLoads[jtPUBLEDGER].setTargetLatency(1000, 2500);
mJobLoads[jtVALIDATION_t].setTargetLatency(500, 1500);
mJobLoads[jtWRITE].setTargetLatency(750, 1500);
mJobLoads[jtTRANSACTION_l].setTargetLatency(100, 500);
mJobLoads[jtPROPOSAL_t].setTargetLatency(100, 500);
@@ -40,6 +41,7 @@ const char* Job::toString(JobType t)
case jtTRANSACTION: return "transaction";
case jtPUBLEDGER: return "publishLedger";
case jtVALIDATION_t: return "trustedValidation";
case jtWRITE: return "writeObjects";
case jtTRANSACTION_l: return "localTransaction";
case jtPROPOSAL_t: return "trustedProposal";
case jtADMIN: return "administration";
@@ -196,7 +198,7 @@ void JobQueue::setThreadCount(int c)
{
c = boost::thread::hardware_concurrency();
if (c < 0)
c = 0;
c = 2;
c += 2;
cLog(lsINFO) << "Auto-tuning to " << c << " validation/transaction/proposal threads";
}