Speaker
Description
Modern analyses in high-energy physics (HEP) have high memory requirements due to the sheer volume of data collected in experiments at the Large Hadron Collider (LHC) at CERN.
Awkward Array recently released a new version of lazy arrays (“virtual arrays”) that mitigates this problem by loading only the columns required for HEP analysis. Nevertheless, these columns can still add up in size, and reducing their memory footprint is crucial to process as many events simultaneously as possible.
In this contribution, we propose compressing in-memory all already loaded arrays to further reduce memory requirements. This technique has been explored in scientific Python applications outside of HEP, most notably by Zarr and Python-Blosc2.
Awkward arrays are represented in memory as a tree-like data structure of many buffers (typically 1D NumPy arrays). The core idea of this contribution is that each underlying buffer of an Awkward array is always compressed in memory. As soon as an operation requires this buffer, it is decompressed, forwarded to the kernel, and then compressed again. Since Awkward's operations typically use very few buffers at the same time, a significant amount of memory can be saved. This makes it possible to analyze more events simultaneously, which in turn improves the overall runtime of HEP analyses. Coffea, a widely used HEP analyses library, implements this feature transparently to its users.
We discuss the concept of in-memory compressed Awkward arrays and present benchmarks with different compression algorithms.