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

Create VT XML at startup to speed up GET_VTS #908

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mattmundell
Copy link
Contributor

What

At startup ospd-openvas stores a VT XML string for each VT. When gvmd calls GET_VTS, then ospd-openvas replies with the premade strings.

Why

With recent PRs gvmd takes about 2m30s to do a rebuild. 1m30s of that is waiting for ospd-openvas to send the VTs. With this change gvmd only waits 1s.

References

Recent gvmd PRs: greenbone/gvmd/pull/1959, greenbone/gvmd/pull/1988

GEA-49

@ArnoStiefvater
Copy link
Member

Hey @mattmundell
Thanks a lot for the WIP PR and nice to see you again!

The PR description sounds great. I will nonetheless add a "Request changes" GitHub review just to make sure that it is not accidentally merged at some point without a scanner-dev having a look. Maybe thats not the best workflow but for now it works ¯\(ツ)

Copy link
Member

@ArnoStiefvater ArnoStiefvater left a comment

Choose a reason for hiding this comment

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

As explained in my other comment. This comment is just here to make sure that a scanner-dev looks at this at some point too.

@mattmundell
Copy link
Contributor Author

Hey @ArnoStiefvater, thanks, nice to see you too :)
I expect it can be done a better way -- mostly I was looking to prove that it can be fast. Happy to clean it up in whatever way, if devs have time for it.
The VT XML 'cache' uses memory and adds to the startup time.
I still have to test the cases where GET_VTS is given a filter or a VT id.

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