Skip to content
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

[Run3 PromptReco] HLTPrescaleProvider::init() uses 4.9 MB memory per stream #46466

Open
makortel opened this issue Oct 21, 2024 · 9 comments
Open

Comments

@makortel
Copy link
Contributor

makortel commented Oct 21, 2024

From #46040 (comment)

The HLTPrescaleProvider::init() is called by pat::PATTriggerProducer::beginRun() and BPHMonitor::bookHistograms(), and ends up using 4.9 MB memory per stream (compare 1 thread/stream profile and 4 thread/stream profile. For an 8-thread/stream prompt reco job this would correspond to 39 MB.

Most of the memory is held by l1t::L1TGlobalUtil::retrieveL1Setup() (similarly to #46448). Does it need to be replicated among streams?

In addition, the l1t::L1TGlobalUtil::retrieveL1Setup() does 50 million memory allocations within its body, and nearly all of these come via the call from HLTPrescaleProvider::init().

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 21, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

A new Issue was created by @makortel.

@Dr15Jones, @antoniovilela, @makortel, @mandrenguyen, @rappoccio, @sextonkennedy, @smuzaffar can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@makortel
Copy link
Contributor Author

assign hlt, l1

@cmsbuild
Copy link
Contributor

New categories assigned: hlt,l1

@aloeliger,@epalencia,@Martin-Grunewald,@mmusich you have been requested to review this Pull request/Issue and eventually sign? Thanks

@makortel
Copy link
Contributor Author

type performance-improvements

@Martin-Grunewald
Copy link
Contributor

Probably not per stream, but https://cmssdt.cern.ch/lxr/source/HLTrigger/HLTcore/interface/HLTPrescaleProvider.h is a helper class, not a plugin itself, to be used as data member of plugins.

@makortel
Copy link
Contributor Author

Both BPHMonitor and pat::PATTriggerProducer::beginRun() are stream modules, and have the HLTPrescaleProvider as data members

HLTPrescaleProvider* hltPrescale_;

HLTPrescaleProvider hltPrescaleProvider_;

that then lead to the memory usage to increase with more streams.

Is HLTPrescaleProvider itself thread safe?

@makortel
Copy link
Contributor Author

In addition, the l1t::L1TGlobalUtil::retrieveL1Setup() does 50 million memory allocations within its body, and nearly all of these come via the call from HLTPrescaleProvider::init().

@Martin-Grunewald
Copy link
Contributor

The class was not written with thread safety in mind, and calls into L1T code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants