Skip to content

Commit 4f9d0f9

Browse files
committed
DPL Analysis: enable cache without prefetching
This give the same results in terms of reduced IOPs, without the problems with the multiple basket branches. It also adds explicitly to the cache all the _size branches. Not yet clear if we need to have ROOT v6.32.06-alice2 as well for this to work correctly.
1 parent 1ff58c4 commit 4f9d0f9

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

Framework/Core/src/TableTreeHelpers.cxx

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -547,14 +547,22 @@ void TreeToTable::addAllColumns(TTree* tree, std::vector<std::string>&& names)
547547
if (mBranchReaders.empty()) {
548548
throw runtime_error("No columns will be read");
549549
}
550-
//tree->SetCacheSize(50000000);
551-
// FIXME: see https://github.com/root-project/root/issues/8962 and enable
552-
// again once fixed.
553-
//tree->SetClusterPrefetch(true);
554-
//for (auto& reader : mBranchReaders) {
555-
// tree->AddBranchToCache(reader->branch());
556-
//}
557-
//tree->StopCacheLearningPhase();
550+
// Was affected by https://github.com/root-project/root/issues/8962
551+
// Re-enabling this seems to cut the number of IOPS in half
552+
tree->SetCacheSize(25000000);
553+
// tree->SetClusterPrefetch(true);
554+
for (auto& reader : mBranchReaders) {
555+
tree->AddBranchToCache(reader->branch());
556+
if (strncmp(reader->branch()->GetName(), "fIndexArray", strlen("fIndexArray")) == 0) {
557+
std::string sizeBranchName = reader->branch()->GetName();
558+
sizeBranchName += "_size";
559+
TBranch* sizeBranch = (TBranch*)tree->GetBranch(sizeBranchName.c_str());
560+
if (sizeBranch) {
561+
tree->AddBranchToCache(sizeBranch);
562+
}
563+
}
564+
}
565+
tree->StopCacheLearningPhase();
558566
}
559567

560568
void TreeToTable::setLabel(const char* label)

0 commit comments

Comments
 (0)