Performance issues when running unfurl_version_range_v2advisor (and others)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- postgresql, python
- Lĩnh vực
- backend, databases, performance
Hướng nghiên cứu
Báo cáo chỉ ra unfurl_version_range_v2advisor improver và các lệnh quản lý import --all và improve --all; trước tiên hãy lập hồ sơ các điểm vào đó dựa trên kích thước các bảng PostgreSQL và truy vấn pg_stat_user_tables được cung cấp. Một đóng góp sẽ cần một thay đổi hiệu năng được xác định rõ và có thể tái lập, cùng một tiêu chí hoàn thành có thể đo lường được; issue hiện chưa chỉ rõ điều nào trong hai điều này.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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?
- Ngôn ngữ chính
- Python
- Star
- 716
- Fork
- 347
- Merge trung bình
- 12 giờ 15 phút
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của aboutcode-org/vulnerablecode
-
OSV parser drops all crates.io affected entries because the ecosystem mapping uses cargoCó thể đã có người làm @Ashutosh-Panda2004 đã nhận 3 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
aboutcode-org/vulnerablecode#2485 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Docker Compose setup fails on wait-for-it host web:8000 and missing runtime .envCó thể đã có người làm @Anurag-S1ngh đã nhận 6 ngày trước. Đang mở
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 77/100
aboutcode-org/vulnerablecode#2477 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
OVAL parser corrupts version bounds when the epoch is 10, 20 or the version contains "0:"Có thể đã có người làm @Ashutosh-Panda2004 đã nhận 4 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
aboutcode-org/vulnerablecode#2474 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
aboutcode-org/vulnerablecode#2426 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Get NuGet package versions from federated PURL version data in https://github.com/aboutcode-data/Có thể làm lại được @Anshi321 đã nhận 25 ngày trước và không có pull request nào đang mở. Đang mởbug data-quality
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
aboutcode-org/vulnerablecode#2418 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của aboutcode-org/vulnerablecode
Issue tương tự
-
infrastructure
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
NatLabRockies/H2Integrate#977 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
topoteretes/cognee#6470 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
area:docs priority:p2 type:docs wave:9
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
jejjohnson/radtrax#293 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug core plugins
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
bunkerity/bunkerweb#4121 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày