-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Performance regression (slowdown) in ALICE event generation #15579
Comments
Attaching callgrind output files showing that the slowdown comes from:
|
Hi @sawenzel . I encountered a problem reproducing:
|
Ok, using something like |
I spoke too soon. The workflow crashes. |
Hi @dpiparo. There was a copy-paste error for the command to run which is now corrected. But I am puzzled why you see these Tcl errors (maybe @ktf could comment). I am literally only doing |
I confirm that with the new command the processing starts. Debugging for real now. |
plugin, otherwise heavy checks in the PluginHandler take place that perform interpreter lookups. Fixes root-project#15579
plugin, otherwise heavy checks in the PluginHandler take place that perform interpreter lookups. Fixes #15579
The PR speeds up by factors (5x-7x) the simple reproducer of the issue we now have thanks to @sawenzel : // Inspired by Alice production code, extracted from the surrounding context
#include "TF1.h"
void Foo(int N) {
double am = 90;
double awidth = 1;
for (int i = 0; i < N; ++i) {
static TF1 rbw("rbw", "pow([1],2)*pow([0],2)/(pow(x*x-[0]*[0],2)+pow(x*x*[1]/[0],2))", -10, 10);
rbw.SetRange(am - 5 * awidth, am + 5 * awidth);
rbw.SetParameter(0, am);
rbw.SetParameter(1, awidth);
am = rbw.GetRandom();
if (am <-100000000) std::cout << am << std::endl; // to avoid compiler optimisations
}
}
int main()
{
Foo(1000);
return 0;
} The code is faster because the fast code path is taken in the PluginHandler because the right type is used in the GSLIntegratorPlugin (unsigned long, via the size_t typedef), and not just a compatible one (unsigned int). |
I confirm that the issue is fixed via #15816. Thank you! |
great. I am backporting the change and closing the issue. Thanks a lot for your help in debugging this problem! |
plugin, otherwise heavy checks in the PluginHandler take place that perform interpreter lookups. Fixes root-project#15579
plugin, otherwise heavy checks in the PluginHandler take place that perform interpreter lookups. Fixes root-project#15579
plugin, otherwise heavy checks in the PluginHandler take place that perform interpreter lookups. Fixes #15579
plugin, otherwise heavy checks in the PluginHandler take place that perform interpreter lookups. Fixes #15579
plugin, otherwise heavy checks in the PluginHandler take place that perform interpreter lookups. Fixes root-project#15579
* easier debugging / valgrinding * mainly to debug the ROOT performance issue root-project/root#15579
plugin, otherwise heavy checks in the PluginHandler take place that perform interpreter lookups. Fixes root-project#15579
* easier debugging / valgrinding * mainly to debug the ROOT performance issue root-project/root#15579
Check duplicate issues.
Description
10-20fold slowdown of running a particular ALICE event generation process, where the generator is compiled just-in-time from a ROOT macro (see reproducer). Slowdown observed when switching from ROOT tag 6.28.04 to 6.28.08.
In particular, bisecting this slowdown shows that it is caused by this commit 4e4545f (from #11631). Reverting this single commit brings back the original performance.
Reproducer
On lxplus7.cern.ch, run:
ROOT version
Everything having 4e4545f included.
Installation method
build from source
Operating system
Linux
Additional context
No response
The text was updated successfully, but these errors were encountered: