Skip to content

Commit

Permalink
DPL Analysis: enable cache without prefetching
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ktf committed Oct 21, 2024
1 parent 6dd7f9d commit 1577c7e
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions Framework/Core/src/TableTreeHelpers.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -499,14 +499,22 @@ void TreeToTable::addAllColumns(TTree* tree, std::vector<std::string>&& names)
if (mBranchReaders.empty()) {
throw runtime_error("No columns will be read");
}
//tree->SetCacheSize(50000000);
// FIXME: see https://github.com/root-project/root/issues/8962 and enable
// again once fixed.
//tree->SetClusterPrefetch(true);
//for (auto& reader : mBranchReaders) {
// tree->AddBranchToCache(reader->branch());
//}
//tree->StopCacheLearningPhase();
// Was affected by https://github.com/root-project/root/issues/8962
// Re-enabling this seems to cut the number of IOPS in half
tree->SetCacheSize(25000000);
// tree->SetClusterPrefetch(true);
for (auto& reader : mBranchReaders) {
tree->AddBranchToCache(reader->branch());
if (strncmp(reader->branch()->GetName(), "fIndexArray", strlen("fIndexArray")) == 0) {
std::string sizeBranchName = reader->branch()->GetName();
sizeBranchName += "_size";
TBranch* sizeBranch = (TBranch*)tree->GetBranch(sizeBranchName.c_str());
if (sizeBranch) {
tree->AddBranchToCache(sizeBranch);
}
}
}
tree->StopCacheLearningPhase();
}

void TreeToTable::setLabel(const char* label)
Expand Down

0 comments on commit 1577c7e

Please sign in to comment.