# Hadd performance question followup

**URL:** <https://root-forum.cern.ch/t/hadd-performance-question-followup/35474>\
**Category:** ROOT\
**Tags:** io\
**Created:** [August 2, 2019, 1:25pm UTC](https://root-forum.cern.ch/t/hadd-performance-question-followup/35474 "2019-08-02T13:25:13Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![rustem](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/r/c0e974/32.png) [@rustem](https://root-forum.cern.ch/u/rustem)\
**Post date:** [August 2, 2019, 1:25pm UTC](https://root-forum.cern.ch/t/hadd-performance-question-followup/35474/1 "2019-08-02T13:25:13Z")

</div>

Hello,

I would like to ask about the status of this question:

> [@Hadd performance question](https://root-forum.cern.ch/t/hadd-performance-question/33263):
>
> Hello, I am trying to merge 500 files with ~3 MB size per file and each containing a few thousand histograms and one TTree. I have noticed following: – hadd completes file directory scan within ~15 minutes; – hadd writes target file with ~150 MB size; – Then there is nothing visible happening for more than a half an hour after that: output file is not modified and there are no messages. It seems that the target file is complete when I try to browse its content. – For the past 30 minutes, ha…

This topic was closed but it seems without the resolution.

Just to explain that waiting for hadd can take hours, which has direct negative impact on efficiency of our analysis work. We will be grateful for speedy resolution of this question.

Thanks,  
Rustem

---

<div class="post-metadata">

**Author:** ![etejedor](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/e79b87/32.png) [@etejedor](https://root-forum.cern.ch/u/etejedor)\
**Post date:** [August 2, 2019, 3:47pm UTC](https://root-forum.cern.ch/t/hadd-performance-question-followup/35474/2 "2019-08-02T15:47:32Z")

</div>

Hello Rustem,

@pcanal will be back from holidays on Monday, I suggest we wait for him to provide you with an answer.

---

<div class="post-metadata">

**Author:** ![amadio](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/amadio/32/12562_2.png) [@amadio](https://root-forum.cern.ch/u/amadio)\
**Post date:** [August 5, 2019, 8:49am UTC](https://root-forum.cern.ch/t/hadd-performance-question-followup/35474/3 "2019-08-05T08:49:45Z")

</div>

I cannot be completely sure, but it used to be the case that deleting all histograms at the end would take a large amount of time. Which version of ROOT are you using? I think this was fixed in later versions of ROOT, at least for hadd.

---

<div class="post-metadata">

**Author:** ![rustem](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/r/c0e974/32.png) [@rustem](https://root-forum.cern.ch/u/rustem)\
**Post date:** [August 6, 2019, 2:02pm UTC](https://root-forum.cern.ch/t/hadd-performance-question-followup/35474/4 "2019-08-06T14:02:09Z")

</div>

OK, thanks for the replies. Do you already which ROOT version includes this now? Otherwise we will wait till Philippe is back on Monday.

Thanks,  
Rustem

---

<div class="post-metadata">

**Author:** ![rustem](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/r/c0e974/32.png) [@rustem](https://root-forum.cern.ch/u/rustem)\
**Post date:** [August 12, 2019, 5:19pm UTC](https://root-forum.cern.ch/t/hadd-performance-question-followup/35474/5 "2019-08-12T17:19:22Z")

</div>

Hello @pcanal and @etejedor,

Just checking if there are some news on this?

Thanks,  
Rustem

---

<div class="post-metadata">

**Author:** ![rustem](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/r/c0e974/32.png) [@rustem](https://root-forum.cern.ch/u/rustem)\
**Post date:** [August 15, 2019, 8:49am UTC](https://root-forum.cern.ch/t/hadd-performance-question-followup/35474/6 "2019-08-15T08:49:18Z")

</div>

Hello @pcanal and @etejedor,

This issue has been open for more than two months. It seems like a trivial fix yet it would signficantly improve efficiency of our workflow. Currently, we run hundreds of jobs to produce large histogram files and often we have to wait longer for hadd them than time it takes to run jobs.

We would grateful for your response and help on this issue. Would it be possible to ask for your reply to this very real issue experienced by at least a few users?

Thanks,  
Rustem

---

<div class="post-metadata">

**Author:** ![etejedor](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/e79b87/32.png) [@etejedor](https://root-forum.cern.ch/u/etejedor)\
**Post date:** [August 15, 2019, 9:06am UTC](https://root-forum.cern.ch/t/hadd-performance-question-followup/35474/7 "2019-08-15T09:06:39Z")

</div>

Hi @rustem,

Sorry for the delay, I will personally ask @pcanal about this.

Cheers,  
Enric

---

<div class="post-metadata">

**Author:** ![rustem](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/r/c0e974/32.png) [@rustem](https://root-forum.cern.ch/u/rustem)\
**Post date:** [August 21, 2019, 9:10am UTC](https://root-forum.cern.ch/t/hadd-performance-question-followup/35474/8 "2019-08-21T09:10:05Z")

</div>

Morning @etejedor and @pcanal,

Do you have any news on this issue?

As I have already mentioned, fixing this issue can really speed up our workflow. I have just talked to a student who has said hadd has been running for hours.

Thanks,  
Rustem

---

<div class="post-metadata">

**Author:** ![etejedor](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/e79b87/32.png) [@etejedor](https://root-forum.cern.ch/u/etejedor)\
**Post date:** [August 21, 2019, 9:24am UTC](https://root-forum.cern.ch/t/hadd-performance-question-followup/35474/9 "2019-08-21T09:24:00Z")

</div>

Perhaps @Axel can also comment on this?

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [August 27, 2019, 6:38am UTC](https://root-forum.cern.ch/t/hadd-performance-question-followup/35474/10 "2019-08-27T06:38:58Z")

</div>

I pinged @pcanal . And I know that @StephanH suggested a patch removing the histogram recursive remove - what happened to that, Stephan?

---

<div class="post-metadata">

**Author:** ![StephanH](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@StephanH](https://root-forum.cern.ch/u/StephanH)\
**Post date:** [August 28, 2019, 11:39am UTC](https://root-forum.cern.ch/t/hadd-performance-question-followup/35474/11 "2019-08-28T11:39:05Z")

</div>

I don’t know what happened. I made the suggestion, but I don’t know whether it was picked up in the end.

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [September 8, 2019, 1:50pm UTC](https://root-forum.cern.ch/t/hadd-performance-question-followup/35474/12 "2019-09-08T13:50:53Z")

</div>

@pcanal is still investigating a solution!

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [September 22, 2019, 1:54pm UTC](https://root-forum.cern.ch/t/hadd-performance-question-followup/35474/13 "2019-09-22T13:54:01Z")

</div>

Closed on September 22, 2019, 1:54pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![pcanal](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pcanal/32/12439_2.png) [@pcanal](https://root-forum.cern.ch/u/pcanal)\
**Post date:** [October 3, 2019, 6:32pm UTC](https://root-forum.cern.ch/t/hadd-performance-question-followup/35474/14 "2019-10-03T18:32:39Z")

</div>

Opened on October 3, 2019, 6:32pm UTC



---

<div class="post-metadata">

**Author:** ![pcanal](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pcanal/32/12439_2.png) [@pcanal](https://root-forum.cern.ch/u/pcanal)\
**Post date:** [October 3, 2019, 6:34pm UTC](https://root-forum.cern.ch/t/hadd-performance-question-followup/35474/15 "2019-10-03T18:34:42Z")

</div>

As a workaround attempt, can you pass the option `-n 2` (actually you can experiment with the numerical value)?  
Also can you send me a sample of your files?

---

<div class="post-metadata">

**Author:** ![pcanal](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pcanal/32/12439_2.png) [@pcanal](https://root-forum.cern.ch/u/pcanal)\
**Post date:** [October 24, 2019, 2:10pm UTC](https://root-forum.cern.ch/t/hadd-performance-question-followup/35474/16 "2019-10-24T14:10:52Z")

</div>

Hi,

I finally managed to go through hadd is to consistently delete the objects and directories ‘right’ after use (rather than accumulating them in memory) and reduce the amount of cleanups needed. This should resolved all (known) performance issues with hadd. The fix is (will be) available in v6.20/00 and 6.18/06.

Cheers,  
Philippe.
