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

Make DBS3Upload slightly more verbose #11768

Merged
merged 1 commit into from
Nov 29, 2023
Merged

Conversation

amaltaro
Copy link
Contributor

Fixes #11767

Status

In development

Description

It does not really fix anything, just make the component more verbose such that we can have a better idea of where the actual bottleneck is.

Is it backward compatible (if not, which system it affects?)

YES

Related PRs

None

External dependencies / deployment changes

None

@amaltaro
Copy link
Contributor Author

BTW, I am applying this patch to submit4, which has not completed any DBS3Upload cycle since Oct 9(!)

@cmsdmwmbot
Copy link

Jenkins results:

  • Python3 Unit tests: succeeded
  • Python3 Pylint check: failed
    • 3 warnings and errors that must be fixed
    • 6 warnings
    • 43 comments to review
  • Pylint py3k check: succeeded
  • Pycodestyle check: succeeded
    • 20 comments to review

Details at https://cmssdt.cern.ch/dmwm-jenkins/view/All/job/DMWM-WMCore-PR-test/14555/artifact/artifacts/PullRequestReport.html

@amaltaro
Copy link
Contributor Author

Based on this patch, we can see from the logs that sumit4 spent ~10h in the following DB write operation:

                self.updateFilesDAO.execute(blocks=loadedBlocks, status="InDBS",
                                            conn=myThread.transaction.conn,
                                            transaction=True)

according to these log records:

2023-10-14 01:55:35,902:139973732001536:INFO:DBSUploadPoller:Updating database record with files injected into DBS
2023-10-14 12:00:51,459:139973732001536:INFO:DBSUploadPoller:Updating 24074 blocks successfully injected into DBS
2023-10-14 12:00:59,938:139973732001536:INFO:BaseWorkerThread:DBSUploadPoller took 76317.350 secs to execute

We don't really know how many files were updated in the database, as those are part of the block data structure. We should definitely slice the number of blocks (files) to be inserted/updated in bulk in the database though.

From the logs above, we can see that updating the block status was fairly quick (8 secs), so I wouldn't be concerned with that one.

I will let submit4 run with this patch, but I am now restarting the other components.

@amaltaro
Copy link
Contributor Author

Even though this extra logging isn't fixing any problem, it gives us a much better insight of where time is spent in the component and I would be in favor of getting these changes in.

If preferred, an easy commitment that might yield good results would be slicing loadedBlocks when executing the following DAOs:

                self.updateFilesDAO.execute(blocks=loadedBlocks, status="InDBS",
                                            conn=myThread.transaction.conn,
                                            transaction=True)
                self.updateBlocksDAO.execute(blocks=loadedBlocks,
                                             conn=myThread.transaction.conn,
                                             transaction=True)

which should be simple enough to add to this PR. @vkuznet @todor-ivanov please let me know if you have any thoughts on this. Otherwise, please review it such that we can merge it.

@amaltaro amaltaro merged commit 35f61a1 into dmwm:master Nov 29, 2023
3 of 4 checks passed
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.

Investigate slowness of DBS3Upload component under heavy load
4 participants