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

Batch all INSERTS into vt_refs #1988

Merged
merged 7 commits into from
Jun 15, 2023
Merged

Conversation

mattmundell
Copy link
Contributor

@mattmundell mattmundell commented May 22, 2023

What

There are about 500k vt_refs and 80k NVTs.

Previously the INSERTs into vt_refs were batched for each NVT, so there was one INSERT per NVT.

Now the INSERTs are batched across NVTs, so there's one INSERT per 50k vt_refs.

Configurable via definition VT_REFS_BATCH_SIZE:

  • 5: 66s
  • 50k: 54s
  • 100k: 50s

Why

Saves about 10s of rebuild.

References

GEA-49

@mattmundell mattmundell marked this pull request as ready for review June 5, 2023 14:11
@mattmundell mattmundell requested a review from a team June 5, 2023 14:11
Copy link
Member

@timopollmeier timopollmeier left a comment

Choose a reason for hiding this comment

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

I think for larger batch actions like this it would be good to to have a command line option do set a different batch size.

@mattmundell
Copy link
Contributor Author

OK, I'll add one.

@timopollmeier timopollmeier merged commit 51d93ce into greenbone:main Jun 15, 2023
@mattmundell mattmundell deleted the batch-vt-refs branch June 20, 2023 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants