-
Notifications
You must be signed in to change notification settings - Fork 4.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
Memory Jump from 14_1_0_pre5
for Phase2 Workflows
#45854
Comments
assign reconstruction |
assign upgrade |
New categories assigned: reconstruction,upgrade @jfernan2,@mandrenguyen,@srimanob,@subirsarkar you have been requested to review this Pull request/Issue and eventually sign? Thanks |
cms-bot internal usage |
A new Issue was created by @AdrianoDee. @Dr15Jones, @antoniovilela, @makortel, @mandrenguyen, @rappoccio, @sextonkennedy, @smuzaffar can you please review it and eventually sign/assign? Thanks. cms-bot commands are listed here |
@AdrianoDee What would be the way to reproduce these jobs in pre4 and pre5 (onwards)? |
@makortel if you check this (or under
you will find all the config used by each job (so with the relative lumisections) as a
where ( |
(Made clearer in the description the link includes the job configs too) |
From RECO side we have been looking at this increase in RSS memory profile since the beginning[1] (indeed there is a drop of RSS to normal levels at the end of the tasks) though igprof profile does not see any difference in mem live consumption[2][3] We have looked at the allocated memory from individual Reco Modules in pre4[4] and pre5[5] and just a general light increase in across all modules can be seen, but not a single real culprit. Our suspect from the beginning was the change to AL9 of the test machines, since pre4>pre5 was at almost the same time as the transition of the operative system, but we did not know if this theory made sense since we ignored how RSS mem is managed. I have discarded this hypotesis now by running pre4 again in AL9. [1] https://cms-reco-profiling.web.cern.ch/cms-reco-profiling/results/summary_plot_html/CMSSW_14_1_step3_12634.21.html |
We have seen before reports or suspicion on the EL8/EL9 host OS leading to more memory being used compared to SLC7 #42929 #45028
@jfernan2 Just to confirm I understood correctly, do you mean that you don't see a significant difference in memory usage between pre4 and pre5 when running on the same node or OS (AL9 I guess)? @AdrianoDee Is there significant difference in sites or host OS versions where the jobs were run between pre4, pre5, pre6, and pre7? |
Using the setup from above, I processed the same 10 events of the pre4 input on an EL8 node using pre4 and pre5
The number of processed events was small, and real statistical conclusions would require more runs, but at least the numbers are not outrageously different. |
My initial conclusion yesterday was that I was seeing NO difference between AL9 and older OS, based on this plot for wf11834.21: where both pre4, pre5 (and pre6) run on AL9, and, except for the very fist few events, RSS was lower for pre4 than pre5 (and pre6) However, this night ended my test on another crosscheck wf12634 in pre4 using AL9, and things have changed: pre4 is now at the RSS levels of pre5 (pre6 and pre7) for more than the half of the first events. So, it looks like there is some dependence on AL9 and the way it handles the RSS.... I am running some extra tests on pre3 using AL9 (all releases except pre4, pre5, pre6 and pre7 in those plots were made before AL9 entered into the game) and with a Phase2 wf25034.21 using pre4 AL9 in order to confirm. I also noticed that the trend in RSS over the job is very different in MC (high at the beginning and then dropping) wfs w.r.t. those in data (increasing over time), see e.g. although the number of events in the task for data wfs is an order of magnitude higher than for mc wfs. I am also testing those again in pre4 using AL9 to have another independent view |
On our side we submit all the RelVals with |
That's the case too in our profiling tests but the machine says at the beginning of the log: |
Ah so there's some possible loop-hole, let me check more carefully. |
After my last profiling tests in pre3 and pre4 with other MC and data workflows, I confirm that running in AL9 increases the peak RSS by a 20-30% in the same job w.r.t. previous OS versions. The RSS gets increased at the beginning of the task/job and then drops for the last events. I will update the plots above with the latest tests later, you can have all the results in text mode at the following folder (dates from Aug and Sep mean AL9): ls -ld /eos/cms/store/user/cmsbuild/profiling/data/CMSSW_14_1_0_pre?/el8_amd64_gcc12/*/step3_TimeMemoryInfo.log | grep Sep |
Well, yes and no. The jobs will use the |
Hi, |
Hi @srimanob |
Right @jfernan2 Do we know if job crash in very beginning, sometimes later. |
No, there is no job crash, just RSS memory is increased at the beginning of the job, see e.g. https://cms-reco-profiling.web.cern.ch/cms-reco-profiling/results/summary_plot_html/CMSSW_14_1_step3_11834.21.html |
I wonder how reproducible is this RSS behavior wrt. the job progress (in terms of event number)? I.e. how the RSS vs "time" plot would look like if you'd run the same job (e.g. pre5) several times on the same node? |
I can'y give you an exact answer, but based on the graphs I sent you for several pre-releases, I would expect fluctuations around the mean value as those given in first left plot of https://cms-reco-profiling.web.cern.ch/cms-reco-profiling/results/summary_plot_html/CMSSW_14_1_step3_140.047.html of the order of 400MB around a mean central value. What is probably more significant is the RSS peak value at the left column of table in the link above |
Hi @AdrianoDee Looking on absolute memory we use in pre5 on Alma9, I try to run as RelVals, 100 jobs, 100 events/job, and what I observe is the RSS is quite stable, a little bit lower than 15 GB. RSS is typically larger when compared to PSS, so I don't understand why we have very large PSS. That means RSS is even larger or equal. For current action, 1 stream should allow you to survive in 16 GB PSS. I also measure it. |
My last test repeating on AL9 the pre3 shows high RSS for the whole job/task, from event 1 to 400: Same for data wfs on pre4 (on AL9): |
Would someone be able to compare (again) the behavior of |
For the peak RSS I have also this plot prior to the inclusion of AL9, I do not know if the fall in 13_3_X was due to AL8, I don't recall the dates of the previous Linux version |
Another piece of information that seems interesting to me. When running exactly the same wf, with exactly the same settings, with
So it seems something related to the OS (and the fact that we presumably run in containers). |
For the moment the only stable and successful setup I found is 8 threads 1 stream and 20GB. |
Were the jobs run on the same nodes (or the same underlying OS)? |
Plotting the RSS and VSIZE from these results I think we'd need a serious analysis of where the memory is being used. The 70 GB VSIZE is scary (especially given what we've learned of the OS-dependent behavior of RSS elsewhere, e.g. in #46040 or #42387). One sort-of obvious memory hog is the (playback of) classical mixing. |
Playback has some serious inefficiencies if the upstream PU producer is multi-threaded/multi-streamed, but I wouldn't expect that to cause memory explosion issues. It might be interesting to run the whole chain with one stream for each step (I believe there should only be one pileup input per stream, so the number of threads shouldn't matter). Playback could be made much more time and IO efficient with some caching in the embedded file input module, but wouldn't expect a large memory impact. |
Should be el9 for both. I say should because I can't find any evidence in the logs of which is the underlying OS. I need to properly check. For the playback, note that we see similar failures even when the jobs is (wrongfully) submitted with no PU replay at RECO step (as in this case for example with 20GB 2 streams and 8 cores). |
I've resubmitted a couple of wfs excluding the |
One further piece. The wf with no
From the logs I see the VSIZE and RSS much more under control (the no-validation job ran on twice of the events given no failures). P.S. let me thank @fabiocos for suggesting the source could be there ( : |
assign dqm |
New categories assigned: dqm @antoniovagnerini,@nothingface0,@rvenditti,@syuvivida,@tjavaid you have been requested to review this Pull request/Issue and eventually sign? Thanks |
Hi @AdrianoDee Thanks for checking. In validation, you include the PU replay as default of validation + DQM, right? |
Yes, the replay is included |
Ah but note that we have the same memory “explosion" even when not-included.
… Il giorno 17 ott 2024, alle ore 07:02, Adriano Di Florio ***@***.***> ha scritto:
Yes, the replay is included
—
Reply to this email directly, view it on GitHub <#45854 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEA6IGV3J7XHZYSZDWRH7ADZ35AG7AVCNFSM6AAAAABNPTBKXCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJYGUYDINRVGE>.
You are receiving this because you are subscribed to this thread.
|
I profiled the example job, I think it was this one , with IgProf, and below is the MEM_LIVE after first event (full profile is here).
|
I also looked the numbers of memory allocations after 2 events, full profile here
|
I think it is pretty clear the sheer volume of data products is the main cause for the memory problems, that is ~3 GB of produced data products (of which 1.5 GB are the The two output modules spending ~1 GB at this stage (I'm sure this would become larger later in the job), and 830 MB in DQM histograms don't help either, even if increasing the number of threads amortizes their cost. The size of ROOT dictionaries is also notable (more than 500 MB or something). The memory churn is substantial, 212 million allocations per event. Although accounting the average time per event from the logs, this would correspond to about 1 MHz allocation rate per stream, which about the same as in Run 3 prompt reco #46040 (comment). |
So |
assign simulation Because of the huge cost of the MC truth for VALIDATION (although possible discussion on its improvements would probably be better to be done in other issue). |
New categories assigned: simulation @civanch,@kpedro88,@mdhildreth you have been requested to review this Pull request/Issue and eventually sign? Thanks |
In one of the latest round of RelVal productions we have observed an increased usage of memory for the RECO step for Phase2 (D110) PU workflows. We spotted this since many jobs started to fail due to an excessive memory usage. This happened because we usually set the memory limit per job to 16GB (for 8 threads 2 streams jobs) and we went quite frequently above that threshold. See e.g. the error report for a TTbar workflow showing the error report (find below the memory reported by condor to have exceeded the
maxPSS
). For the equivalent inpre4
we just had a few failures.See also the
PeakValueRss
reported in theFrameworkJobReport.xml
output for each job. I'm not sure how to interpret the low value tail for pre5.Bottom line: something happened between pre4 and pre5 that caused the memory usage at RECO step to jump quite a bit.
Reports
I've copied all the job reports and configs for TTbar PU=200 here or you can check in
/eos/cms/store/logs/prod/2024/06/WMAgent/pdmvserv_RVCMSSW_14_1_0_pre4TTbar_14TeV__STD_2026D110_PU_240604_235438_8449/
/eos/cms/store/logs/prod/2024/08/WMAgent/pdmvserv_RVCMSSW_14_1_0_pre5TTbar_14TeV__STD_2026D110_PU_240801_183220_4814/
We have "solved" this on our side by rising the memory used to 20GB. And the situation is unchanged in
14_1_0pre6
(and14_1_0_pre7
) since we are still seing failures if the memory max is set to 16GB.The text was updated successfully, but these errors were encountered: