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
Add GlobalCache to DeepFlavourJetTagsProducer to improve startup perf… #22886
Add GlobalCache to DeepFlavourJetTagsProducer to improve startup perf… #22886
Conversation
…ormance igprof profiles showed this module was taking significant time at startup, most as it reads the configuration file used to initialize its neural network (lots of memory churn also). Without the GlobalCache the startup time is proportional to the number of streams. This change moves the LightweightNeuralNetwork into the global cache so there is only one and the initialization time is no longer proportional to the number of streams. LightweightNeuralNetwork is supposed to be thread safe to use in this manner.
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-22886/4267 |
A new Pull Request was created by @wddgit (W. David Dagenhart) for master. It involves the following packages: RecoBTag/Combined @perrotta, @cmsbuild, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test FYI @Dr15Jones |
The tests are being triggered in jenkins. |
+1 The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic: |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+1 for #22886 292f7ac
Based on somewhat old memory performance tests, I confirm the memory churn size and note that the total RSS savings are not very large, expected to go down from 1.9 MB *nStreams to just 1.9 MB. |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
…ormance
igprof profiles showed this module was taking significant
time at startup, mostly as it reads the configuration file
used to initialize its neural network (lots of memory
churn also, around 150 MB per stream). Without the
GlobalCache, the startup time is proportional to the number
of streams. This change moves the LightweightNeuralNetwork
into the global cache so there is only one and the initialization
time is no longer proportional to the number of streams.
LightweightNeuralNetwork is supposed to be thread safe
to use in this manner.
Some other minor cleanup also.
The intent is that after merging this PR the module will give
identical results as before. I tested simply by putting in print
statements for the output of the neural network and also all
the parameter values I moved around. Then I compared the
output before and after in a runTheMatrix test that runs it (25.0).
All was identical. I also ran under igprof and verified the initialization
time is now constant and not proportional to the number of streams.