Performance issues when running unfurl_version_range_v2advisor (and others)
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 25/100
- Issue 類型
- 缺陷
- 描述清晰度
- 需要釐清
- 活躍度
- 冷清
- 技術堆疊
- postgresql, python
- 領域
- backend, databases, performance
研究方向
報告指出了 unfurl_version_range_v2advisor improver 以及管理命令 import --all 和 improve --all;首先根據提供的 PostgreSQL 資料表大小和 pg_stat_user_tables 查詢,對這些進入點進行效能分析。一項貢獻需要明確且可重現的效能變更,以及可量測的完成標準,而目前的 issue 尚未指定這兩者中的任何一個。
由索引模型根據 Issue 內容生成。
描述
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?
- 主要語言
- Python
- 星號
- 716
- 分支
- 347
- 平均合併
- 12 小時 15 分鐘
- 30 天內合併 PR
- 9
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 沒有貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
aboutcode-org/vulnerablecode 的其他 Issue
-
OSV parser drops all crates.io affected entries because the ecosystem mapping uses cargo可能已有人在做 @Ashutosh-Panda2004 於 2 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 76/100
aboutcode-org/vulnerablecode#2485 · 1 則留言 ·
維護者通常 1 天內回覆
-
Docker Compose setup fails on wait-for-it host web:8000 and missing runtime .env可能已有人在做 @Anurag-S1ngh 於 5 天前認領。 未關閉
難度 2/5 半天 新手友好度 77/100
aboutcode-org/vulnerablecode#2477 · 1 則留言 ·
維護者通常 1 天內回覆
-
OVAL parser corrupts version bounds when the epoch is 10, 20 or the version contains "0:"可能已有人在做 @Ashutosh-Panda2004 於 3 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 76/100
aboutcode-org/vulnerablecode#2474 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 86/100
aboutcode-org/vulnerablecode#2426 ·
維護者通常 1 天內回覆
-
Get NuGet package versions from federated PURL version data in https://github.com/aboutcode-data/可能重新可做 @Anshi321 於 25 天前認領,目前沒有進行中的 PR。 未關閉bug data-quality
難度 2/5 1-3 小時 新手友好度 72/100
aboutcode-org/vulnerablecode#2418 · 4 則留言 ·
維護者通常 1 天內回覆
查看 aboutcode-org/vulnerablecode 的全部 Issue
相似的 Issue
-
priority middle
難度 1/5 1 小時以內 新手友好度 62/100
KATO-Hiro/AtCoderClans#12940 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 76/100
huggingface/huggingface_hub#5283 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 78/100
維護者通常 1 天內回覆
-
enhancement
難度 1/5 1 小時以內 新手友好度 86/100
維護者通常 1 天內回覆
-
bug example
難度 2/5 1-3 小時 新手友好度 86/100
維護者通常 1 天內回覆