Code
Framework
References
Other Formats
Demonstrating the Coordinate Approach on ROOT TTree I/O
This development plan describes how SSCCS will demonstrate the coordinate approach on the ROOT TTree I/O bottleneck: the same analysis, the same TTree API, and the same build chain, with the read path served from a coordinate-indexed store instead of the medium. ROOT’s TFile disk handling is never modified. The plan covers the approach, what the demonstration delivers, how it works, milestones, and boundaries.
Status: Draft development plan. The demonstration proceeds only after the engagement path in the CERN-SSCCS Collaboration Framework is accepted.
The demonstration does not modify ROOT’s disk handling: TFile’s buffering, compression, and serialization remain exactly as they are. For byte ranges mapped into the Chton coordinate store, data is served from the store before any disk access happens; for everything else, the call proceeds through TFile unchanged. The existing stack runs as-is: the same executable, the same TTree API, the same build chain.
The byte-source boundary sits below TFile, at the POSIX I/O entry points:
researcher code (unchanged)
↓
TTree::GetEntry(entry)
↓
TBranch::GetEntry(entry)
↓
TTreeCache::GetEntry()
↓
TFile::ReadBuffer()
↓
[byte-source boundary] ← standard dynamic-link interposition
├─ range mapped in the coordinate store → served from the store
└─ otherwise → passed through to read()/pread()/mmap() unchanged
The working analysis treats TFile::ReadBuffer() as the symptom, not the cause, and points to the upper layers: a single event requests 153 data products spread across 8,190 branches; multithreaded runs calling GetEntry out of order can invalidate TTreeCache and collapse vector reads into singular reads; beyond 100,000 clusters, TTreeCache degrades from 7 seconds to over an hour. The documented result is 372,000 requests averaging 4.6 KB, an effective 33 KB/s, and a 14-hour workload. M1 confirms which term dominates.
At raw bandwidth, 1.6 GB moves in seconds. The working hypothesis is that the 14 hours are per-request overhead: each of the 372,000 reads carries a system call, a page cache lookup, and often a context switch; the 8,190 fully split branches scatter event data across memory, collapsing cache locality; and 372,000 distinct small chunks keep the kernel page cache thrashing. M1 measures this hypothesis directly: the baseline trace separates system call, page cache, copy, and ROOT-internal costs, so the demonstration targets the measured dominant term. A first-order cost model of these terms accounts for roughly an hour of the fourteen; where the remaining time is spent is not yet attributed, and no projection is made until the baseline trace supplies the split.
The coordinate approach addresses this structurally: for mapped data, the read path never reaches the medium. The magnitude of the effect is a measurement, not a claim; the benchmark milestone reports the comparison against the ROOT baseline.
The removal is structural rather than incremental:
The demonstration is a single shared library, libtagma_cern.so, built with standard C++17 and CMake. Researchers run their analysis unchanged:
root -b -q analyze.CWith one environment variable added:
LD_PRELOAD=./libtagma_cern.so root -b -q analyze.CThe demonstration preserves:
It consists of three parts:
The coordinate engine is closed-form arithmetic: composition and decomposition through \(C(i,m,f) = \text{U+AC00} + 588i + 28m + f\) and its inverse, with no hash function involved. An event is addressed as a coordinate, (run, luminosity block, event number), which resolves to a direct offset in the store.
The library is loaded through the standard dynamic linker (LD_PRELOAD) and decides at the POSIX I/O boundary (read, pread, mmap) whether a byte range is served from the coordinate store or passed through to ROOT unchanged, the same mechanism Darshan uses to trace ROOT I/O in production.
The demonstration deliberately stays at the byte-source boundary. Reaching into ROOT’s branch and cache traversal would require a ROOT-side extension and would change the deployment surface; it is out of scope. The result is the principle stated at the top: the same ABI, a different byte source; the researcher’s executable, the TTree API, and the build chain remain identical, and only the interior implementation changes.
If the measured comparison holds, the results provide the basis for discussing wider adoption and a potential contribution to the ROOT ecosystem. Everything in the demonstration is released as open source.