Skip to content

Improved benchmarking of compression algorithms - #225

Closed
oshadura wants to merge 1 commit into
root-project:masterfrom
oshadura:improve-someio-benchmarks
Closed

Improved benchmarking of compression algorithms#225
oshadura wants to merge 1 commit into
root-project:masterfrom
oshadura:improve-someio-benchmarks

Conversation

@oshadura

@oshadura oshadura commented May 20, 2021

Copy link
Copy Markdown
Contributor

I added a new CMake option: experiment-datafiles - that allows to download experiments files (CMS, ATLAS) that are bigger then 1.5 GB

I also used these benchmarks for testing FLZMA2 (suggestions are welcomed!)
(this pr replaces #216)

I added a new CMake option: experiment-datafiles - that allows to download experiments files (CMS, ATLAS) that are bigger then 1.5 GB
@oshadura
oshadura requested a review from eguiraud May 20, 2021 13:23

@eguiraud eguiraud left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Oksana, looks good except the questions below.

I can't comment on whether the pattern

auto newtree = oldtree->CloneTree();
timer.Start();
newfile->Write();
timer.Stop()

does what we want, but you know better.

The RDF benchmarks look ok as long as we remember that they measure both the writing and the data generation, differently from the other benchmarks.

double rtime = timer.RealTime();
double ctime = timer.CpuTime();
// For Run2012B_DoubleMuParked.root:
float size_mb = 774.619423;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these hardcoded values are a bit "scary", can we get them programmatically?

if(experiment-datafiles)
# We need to enable download of datafiles from oot.cern.ch
set(rootbench-datafiles ON CACHE BOOL "Download files from root.cern.ch" FORCE)
endif() No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need a separate option? other files downloaded if rootbench-datafiles is on are not much smaller, and now we have two options that we need to set to get all benchmarks.

if we need the option, why does it imply root-benchdatafiles=ON? it would be simpler to keep them orthogonal - one turns on some benchmarks, the other turns on some other.

if we need the second option, it needs at least to be mentioned in the README.

@guitargeek

Copy link
Copy Markdown
Contributor

Thank you @oshadura for this work, and apologies for the long silence on it!

The improvements proposed here have now landed in two parts, so I'm closing this PR:

  • The compression benchmarks themselves (LHCb / NanoAOD / ATLAS) were re-enabled via Fix compression benchmarks #179, which took the hadd-based approach: recompressing the input with the target algorithm before the timed read, so that the measurement is not affected by CloneTree() fast-copying the original baskets without recompression.
  • The RDataFrame snapshot improvements from this PR (parametrizing over compression levels and reporting the compressed size and throughput) are implemented on top of the current state of the repository in Parametrize RDataFrame snapshot benchmarks over compression levels #308, with the data generation moved out of the timed region (addressing @eguiraud's review comment here).

The experiment-datafiles idea for gating the >1.5 GB CMS/ATLAS files behind a separate CMake option didn't make it in, since the merged benchmarks deliberately use moderately sized files. But it would still be a welcome, small standalone PR if we ever want to benchmark the big samples again.

Thanks again for pushing on the compression benchmarking. The ideas here outlived the branch!

@guitargeek guitargeek closed this Sep 3, 2026
guitargeek added a commit that referenced this pull request Sep 3, 2026
Each compression algorithm is now benchmarked at levels 1, 6 and 9
instead of a single hardcoded level, and the benchmarks report the
compressed file size and the throughput of uncompressed input bytes.

The benchmarked dataset is also made big enough for the compression to
dominate over the fixed snapshot overheads (10 million doubles instead
of 100 thousand). The input data is generated only once, so that unlike
before, the random number generation does not contribute to the
measured time. The output file is now written to RB_TEMP_FS and removed
afterwards.

This implements the improvements proposed for these benchmarks in
PR #225 on top of the current state of the repository.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants