Commit 94e4e627 authored by Steven Murray's avatar Steven Murray
Browse files

[Catalogue] operations#179 Slow `cta-admin sq` even when there is very little activity

Removed redundant respondPreparationTime from the timing log of
the Scheduler::getQueuesAndMountSummaries() method.  The meaning of
the value was not only redundant after the latests modifications to
the method but it had also changed.
parent 9e8002c6
......@@ -1567,9 +1567,9 @@ std::list<common::dataStructures::QueueAndMountSummary> Scheduler::getQueuesAndM
std::list<common::dataStructures::QueueAndMountSummary> ret;
// Extract relevant information from the object store.
utils::Timer t;
utils::Timer schedulerDbTimer;
auto mountDecisionInfo=m_db.getMountInfoNoLock(SchedulerDatabase::PurposeGetMountInfo::SHOW_QUEUES,lc);
auto schedulerDbTime = t.secs(utils::Timer::resetCounter);
const auto schedulerDbTime = schedulerDbTimer.secs();
auto & mdi __attribute__((unused)) = *mountDecisionInfo;
std::set<std::string> tapesWithAQueue;
......@@ -1585,8 +1585,9 @@ std::list<common::dataStructures::QueueAndMountSummary> Scheduler::getQueuesAndM
}
// Obtain a map of vids to tape info from the catalogue
utils::Timer catalogueVidToLogicalLibraryTimer;
const auto vid_to_logical_library = m_catalogue.getVidToLogicalLibrary(tapesWithAQueue);
const auto catalogueVidToLogicalLibraryTime = t.secs(utils::Timer::resetCounter);
const auto catalogueVidToLogicalLibraryTime = catalogueVidToLogicalLibraryTimer.secs();
for (auto & pm: mountDecisionInfo->potentialMounts) {
// Find or create the relevant entry.
......@@ -1681,13 +1682,11 @@ std::list<common::dataStructures::QueueAndMountSummary> Scheduler::getQueuesAndM
mountOrQueue.tapePool = t.tapePoolName;
}
}
auto respondPreparationTime = t.secs();
log::ScopedParamContainer spc(lc);
spc.add("catalogueVidToLogicalLibraryTime", catalogueVidToLogicalLibraryTime)
.add("schedulerDbTime", schedulerDbTime)
.add("catalogueGetTapePoolTotalTime", catalogueGetTapePoolTotalTime)
.add("catalogueGetTapesTotalTime", catalogueGetTapesTotalTime)
.add("respondPreparationTime", respondPreparationTime);
.add("catalogueGetTapesTotalTime", catalogueGetTapesTotalTime);
lc.log(log::INFO, "In Scheduler::getQueuesAndMountSummaries(): success.");
return ret;
}
......
Supports Markdown
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