Performance issues when running unfurl_version_range_v2advisor (and others)
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Bug
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Ruhig
- Tech-Stack
- postgresql, python
- Bereich
- backend, databases, performance
Rechercherichtung
Der Bericht verweist auf den unfurl_version_range_v2advisor improver sowie auf die Verwaltungsbefehle import --all und improve --all; beginne damit, diese Einstiegspunkte anhand der PostgreSQL-Tabellengrößen und der bereitgestellten pg_stat_user_tables-Abfrage zu profilieren. Für einen Beitrag wären eine definierte, reproduzierbare Performance-Änderung und ein messbares Abschlusskriterium erforderlich, die der Issue derzeit nicht spezifiziert.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Hi Team,
first release: v34.0.0rc4 (or earlier)
current release: 38.1.0
Our database dates back 2+years and has grown a lot. I checked the sizes of some of the tables using this command:
SELECT
schemaname AS schema,
relname AS table_name,
n_live_tup AS row_count
FROM
pg_stat_user_tables
ORDER BY
n_live_tup DESC;
Results were staggering:
"vulnerabilities_impactedpackageaffecting" 735403239 =735 mln (!!!)
"vulnerabilities_advisory" 54630236 = 54 mln
"vulnerabilities_advisoryrelatedalias" 54622255 = 54 mln
"vulnerabilities_packagechangelog" 34332358 = 34 mln
"vulnerabilities_vulnerability_severities" 32511124 = 32 mln
"vulnerabilities_vulnerabilityseverity" 32221132 = 32 mln
"vulnerabilities_impactedpackage" 25634100 = 25 mln
"vulnerabilities_impactedpackagefixedby" 8558740 = 8mln
We are running VulnerableCode on OpenShift and decided that we wanted a regular updates of the importers and improvers, so we created CronJobs that would import/improve just one thing each (for example python manage.py import nvd_importer_v2). With the new version we have 137 pods running running at different times of day. While this was a lot but sort of manageable (at least we thought) we have starting noticing problems our database was under enormous load especially when improvers run. While I know that this is caused by parallel runs there is one specific improver that causes our nodes to crash and push the database beyond CPU limits - unfurl_version_range_v2advisor it was running usually for 4 days straight and using north of 44 GiB of RAM on OpenShift and 10-12 CPUs on PostgreSQL side.
With this we tried running importers and improvers as it says in documentation import --all and improve --all but those takes days or weeks to do.
Most recent importer --all run:
CommandError: 8 failed!: apache_kafka_importer_v2,mattermost_importer_v2,gitlab_importer,pypa_importer,npm_importer,nginx_importer,pysec_importer,vulnerabilities.importers.istio.IstioImporter
and it still took 26 hrs. and that is just importers on their own.
We haven't been able to do full run of the improve -all as of yet as I have seen some of those improvers can run for 3-4 days each.
So the question here arises, what to do with this as with this version it is unusable for our production instances.
what to do?
- Delete the whole thing and start over with new db
- Run importers once every 26 hrs, and then start improve --all which will take most likely weeks
- Skip most resource intensive improvers and just do the rest?
I would love to hear your suggestions on possible solutions, or how you run it?
- Vorherrschende Sprache
- Python
- Sterne
- 716
- Forks
- 347
- Ø Merge
- 12 Std. 15 Min.
- Gemergte PRs (30 T.)
- 9
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus aboutcode-org/vulnerablecode
-
OSV parser drops all crates.io affected entries because the ecosystem mapping uses cargoEvtl. vergeben @Ashutosh-Panda2004 hat das vor 2 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
aboutcode-org/vulnerablecode#2485 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Docker Compose setup fails on wait-for-it host web:8000 and missing runtime .envEvtl. vergeben @Anurag-S1ngh hat das vor 6 Tagen übernommen. Offen
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 77/100
aboutcode-org/vulnerablecode#2477 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
OVAL parser corrupts version bounds when the epoch is 10, 20 or the version contains "0:"Evtl. vergeben @Ashutosh-Panda2004 hat das vor 4 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
aboutcode-org/vulnerablecode#2474 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
aboutcode-org/vulnerablecode#2426 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Get NuGet package versions from federated PURL version data in https://github.com/aboutcode-data/Evtl. wieder frei @Anshi321 hat das vor 25 Tagen übernommen, und es ist kein Pull Request offen. Offenbug data-quality
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
aboutcode-org/vulnerablecode#2418 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in aboutcode-org/vulnerablecode
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 79/100
aws-samples/sample-per-model-bedrock#639 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 86/100
awslabs/visual-asset-management-system#937 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 79/100
project-codeflare/codeflare-sdk#1195 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Bump numpy dependencyOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
pandas-dev/pandas-stubs#2051 ·
Maintainer antworten meist innerhalb von 1 Tag