-
Notifications
You must be signed in to change notification settings - Fork 843
Long load times for Software -> Show versions page #34677
Copy link
Copy link
Closed
Labels
#g-security-complianceSecurity & Compliance product groupSecurity & Compliance product group:releaseReady to write code. Scheduled in a release. See "Making changes" in handbook.Ready to write code. Scheduled in a release. See "Making changes" in handbook.P2Urgent: Supported workflow not functioning as intended, newly drafted feature with urgent Fleet needUrgent: Supported workflow not functioning as intended, newly drafted feature with urgent Fleet needbugSomething isn't working as documentedSomething isn't working as documentedcustomer-numa~released bugThis bug was found in a stable release.This bug was found in a stable release.~software-ingestionIssue regarding ingesting software inventory from a host into Fleet.Issue regarding ingesting software inventory from a host into Fleet.
Milestone
Metadata
Metadata
Assignees
Labels
#g-security-complianceSecurity & Compliance product groupSecurity & Compliance product group:releaseReady to write code. Scheduled in a release. See "Making changes" in handbook.Ready to write code. Scheduled in a release. See "Making changes" in handbook.P2Urgent: Supported workflow not functioning as intended, newly drafted feature with urgent Fleet needUrgent: Supported workflow not functioning as intended, newly drafted feature with urgent Fleet needbugSomething isn't working as documentedSomething isn't working as documentedcustomer-numa~released bugThis bug was found in a stable release.This bug was found in a stable release.~software-ingestionIssue regarding ingesting software inventory from a host into Fleet.Issue regarding ingesting software inventory from a host into Fleet.
Type
Projects
Status
Done
UPDATE: This issue does not include the complete fix for the /software/versions endpoint. Follow up issue at: #35799
Another related fix/optimization that may result in additional speed up: #35805
Fleet version:
4.75.0
💥 Actual behavior
Customer reports:
This is a follow up to #32178
UPDATE: After #32178 the vulnerabilities load time is under 5 seconds in customer environment, so this issue will only deal with software versions page.
🛠️ To fix
For vulnerabiliites, the COUNT query can be optimized. From my loadtest:
For versions, the COUNT query can be optimized by dropping joins with CVEs. The main query can be optimized by removing a second sort when not sorting by CVE details.
These are not simple fixes (but not too bad) because of the number of parameters these API endpoints take.
🧑💻 Steps to reproduce
🕯️ More info (optional)
Some ideas for improving versions: main...victor/34677-improve-versions-poc
#28091 will also help here by reducing the numbers of CVEs in the DB.
QA
Results from load test with ~300K software titles and ~100K hosts.
Using script: https://gist.github.com/getvictor/0ef1da8bf1b85a4a8a6d3ee94c254e08