-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rechunker using Mailbox #710
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I dont have time to really test this but I read all the changes and its well written and organized. Given that this is a relatively isolated tool I think its safe to merge.
Thanks Yossi, I agree, apart from the unit-tests, I tested it extensively on the DAQ. The main use case, XENONnT/straxen#1074 comes with extra safeguards that should catch any failures before integrating any data into the pipeline. So far with the current data-scheme (run 050411), all is running very stably. |
What is the problem / what does the code in this PR do
Rechunking of our data is much sought after by computing as our framework creates many small files that make them cumbersome to handle. Therefore we added a tool which does this in #686. We are now expanding it's use cases by implementing it in the DAQ workflow in XENONnT/straxen#1074.
For XENONnT/straxen#1074 I noticed the rather poor performance if all files are rechunked in serial. Therefore, I looked into parallelizing the load->saver + rechunk approach. I re-used the mailbox paradigm for this - as it was easier than just making some home-grown algorithm. Doing some parallelization here makes sense for it is similarly dependent on I/O as CPU intense (but not at the same time), so you might be waiting on I/O while the CPU is doing nothing and vice versa.
Additionally, I incorporated #709's idea of having a progress bar. I think it's quite neat.
Can you briefly describe how it works?
Use the mailbox system to load and save chunks of data. This allows easily running in multi-thread or multicore approaches.
Can you give a minimal working example (or illustrate with a figure)?
On one of the event builders servers if the DAQ, the speedup with modest number of threads ~5-10x.
On my own machine (I/O limited) the speedup is not as large: