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

remove memory-churn in SiPixelTemplate2D::pushfile #40537

Merged
merged 1 commit into from Jan 25, 2023

Conversation

VinInn
Copy link
Contributor

@VinInn VinInn commented Jan 16, 2023

PreMIx workflow was affected by a huge "memmove" storm during initialization (first event).
It was easy to locate it in SiPixelTemplate2D::pushfile.
In this purely technical PR all copies of vectors (of vectors (eventually of vectors)) have been removed.

running just initialization using

cmsDriver tt_digi --no_exec --datamix PreMix --conditions auto:phase1_2022_realistic --pileup_input file:pu.root -n 16 --era Run3 --eventcontent RAWSIM --procModifiers premix_stage2 --filein file:gensim.root -s DIGI,DATAMIX,L1,DIGI2RAW,HLT:@relval2022 --datatier GEN-SIM-DIGI-RAW --geometry DB:Extended --nThreads 8 --suffix -j JobReport.xml --customise Validation/Performance/TimeMemorySummary.customiseWithTimeMemorySummary

memory allocation is reduced
from
5017054 kmem:mm_page_alloc
5835471 kmem:mm_page_free
to
1341162 kmem:mm_page_alloc
2126517 kmem:mm_page_free

while the system time goes down from
61.298107000 seconds
to
21.264676000 seconds

I made minimal changes preserving previous behavior.
I leave to code owners any eventual further cleanup.

No change expected.

@@ -61,7 +61,7 @@ class SiPixel2DTemplateDBObject {
int maxIndex() const { return maxIndex_; }
int numOfTempl() const { return numOfTempl_; }
float version() const { return version_; }
std::vector<float> sVector() const { return sVector_; }
std::vector<float> const& sVector() const { return sVector_; }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be honest this is the ONLY change that makes a real difference

Copy link
Contributor Author

@VinInn VinInn Jan 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If code-owners prefer: just keep this.

@VinInn
Copy link
Contributor Author

VinInn commented Jan 16, 2023

The ultimate optimization should be to create an EsProduct with what produced by pushFile to avoid to have a copy for each producer (in each thread)

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40537/33759

  • This PR adds an extra 28KB to repository

@VinInn
Copy link
Contributor Author

VinInn commented Jan 16, 2023

@cmsbuild please test

@VinInn
Copy link
Contributor Author

VinInn commented Jan 16, 2023

one needs to test digit premix (not sure is included in default tests)

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @VinInn (Vincenzo Innocente) for master.

It involves the following packages:

  • CondFormats/SiPixelObjects (db, alca)
  • CondFormats/SiPixelTransient (db, reconstruction)

@malbouis, @yuanchao, @ChrisMisan, @clacaputo, @saumyaphor4252, @ggovi, @tvami, @mandrenguyen, @francescobrivio can you please review it and eventually sign? Thanks.
@tocheng, @mroguljic, @dkotlins, @ferencek, @mmusich, @seemasharmafnal, @tvami this is something you requested to watch as well.
@perrotta, @dpiparo, @rappoccio you are the release manager for this.

cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-40537/33766

  • This PR adds an extra 28KB to repository

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-45cf13/30016/summary.html
COMMIT: 9f0fe68
CMSSW: CMSSW_13_0_X_2023-01-16-1100/el8_amd64_gcc11
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/40537/30016/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

There are some workflows for which there are errors in the baseline:
11634.15 step 3
The results for the comparisons for these workflows could be incomplete
This means most likely that the IB is having errors in the relvals.The error does NOT come from this pull request

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 8 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3555538
  • DQMHistoTests: Total failures: 6
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3555510
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 48 files compared)
  • Checked 211 log files, 162 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@ChrisMisan
Copy link
Contributor

type performance-improvement

@ChrisMisan
Copy link
Contributor

+alca

  • technical PR, no changes in comparison

@mandrenguyen
Copy link
Contributor

+reconstruction

@tvami
Copy link
Contributor

tvami commented Jan 23, 2023

test parameters:

  • enable_tests = profiling

@tvami
Copy link
Contributor

tvami commented Jan 23, 2023

@cmsbuild , please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-45cf13/30129/summary.html
COMMIT: 9f0fe68
CMSSW: CMSSW_13_0_X_2023-01-23-1100/el8_amd64_gcc11
Additional Tests: PROFILING
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/40537/30129/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 2 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3555495
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3555473
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 48 files compared)
  • Checked 211 log files, 162 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@tvami
Copy link
Contributor

tvami commented Jan 25, 2023

+db

  • changes in CondFormat are acceptable for the DB schema evolution

@cmsbuild
Copy link
Contributor

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. @perrotta, @dpiparo, @rappoccio (and backports should be raised in the release meeting by the corresponding L2)

@rappoccio
Copy link
Contributor

+1

  • Technical PR

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

Successfully merging this pull request may close these issues.

None yet

6 participants