Commit 3700682c authored by Elvin Sindrilaru's avatar Elvin Sindrilaru

MGM: Refine parameters of the thread pool for proc commands

parent 17710228
Pipeline #467084 passed with stages
in 34 minutes and 27 seconds
......@@ -368,12 +368,12 @@ DrainFs::UpdateProgress()
bool is_stalled = (duration_cast<seconds>(duration).count() >
sStallTimeout.count());
eos_debug("msg=\"fsid=%d, timestamp=%llu, last_progress=%llu, is_stalled=%i, "
"num_to_drain=%llu, last_num_to_drain=%llu, running=%llu, "
"pending=%llu, failed=%llu\"", mFsId,
"total_files=%llu, num_to_drain=%llu, last_num_to_drain=%llu, "
"running=%llu, pending=%llu, failed=%llu\"", mFsId,
duration_cast<milliseconds>(now.time_since_epoch()).count(),
duration_cast<milliseconds>(mLastProgressTime.time_since_epoch()).count(),
is_stalled, num_to_drain, mLastNumToDrain, mJobsRunning.size(),
mJobsPending.size(), mJobsFailed.size());
is_stalled, mTotalFiles, num_to_drain, mLastNumToDrain,
mJobsRunning.size(), mJobsPending.size(), mJobsFailed.size());
// Check if drain expired
if (mDrainPeriod.count() && (mDrainEnd < now)) {
......@@ -445,6 +445,7 @@ DrainFs::UpdateProgress()
fs->SetLongLong("stat.timeleft", time_left, false);
fs->SetLongLong("stat.drainbytesleft",
fs->GetLongLong("stat.statfs.usedbytes"), false);
eos_debug("msg=\"fsid=%d, update progress", mFsId);
}
// Sleep for a longer period since nothing moved in the last 10 min
......
......@@ -420,15 +420,16 @@ IProcCommand::HasSlot(const eos::console::RequestProto& req_proto)
{
static bool init = false;
// Initialize only one in the beginning
// Initialize only once in the beginning
if (!init) {
init = true;
init = true;
for (const auto& type : {
eos::console::RequestProto::kAcl,
eos::console::RequestProto::kNs,
eos::console::RequestProto::kDrain,
eos::console::RequestProto::kFind,
eos::console::RequestProto::kFs,
eos::console::RequestProto::kRm,
eos::console::RequestProto::kStagerRm,
eos::console::RequestProto::kRoute
......
......@@ -37,9 +37,9 @@ std::list<std::unique_ptr<IProcCommand>> ProcInterface::mCmdToDel;
std::unordered_map<std::string, std::unique_ptr<IProcCommand>>
ProcInterface::mMapCmds;
eos::common::ThreadPool ProcInterface::sProcThreads(
std::max(std::thread::hardware_concurrency() / 10, 4u),
std::max(std::thread::hardware_concurrency() / 4, 256u)
);
std::max(std::thread::hardware_concurrency() / 10, 64u),
std::max(std::thread::hardware_concurrency() / 4, 256u),
3, 2, 2, "proc_pool");
//------------------------------------------------------------------------------
// Factory method to get a ProcCommand object
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment