Can the location of the disk cache be customised, and does CodeQL gracefully handle missing cache?
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
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- aws
- Lĩnh vực
- cloud, performance
Hướng nghiên cứu
Bắt đầu bằng việc điều tra hành vi của các tùy chọn --max-disk-cache, --compilation-cache và --common-caches, bao gồm cả việc điều gì xảy ra khi thư mục cache biến mất trong quá trình phân tích. Issue không nêu tên tệp hoặc bài kiểm thử, vì vậy cần xác định phần triển khai cache và phạm vi kiểm thử khôi phục hiện có của nó. Công việc được xem là hoàn tất khi xác định được liệu đường dẫn cache tùy chỉnh và khả năng khôi phục một cách phù hợp có được hỗ trợ hay không, hoặc xác định phần triển khai cần thiết cho cả hai.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
My key questions here are:
- Can the location of the disk cache (the one whose size is set by the
--max-disk-cacheflag) be set to a custom path? - What happens if the cache directory disappears (e.g. due to a disk unmount) in the middle of an analysis run? Does CodeQL recover gracefully from this?
I tried looking for a flag to set the cache path but I couldn't find one that looked correct. I saw --compilation-cache and --common-caches but it didn't seem like they control the path of the intermediate result cache.
My motivation here is that I've got an extremely large codebase that I'm trying to run CodeQL analysis on, but the memory requirements make this analysis infeasible on any local machines I have access to - even with 100GiB of RAM and a 200GiB NVMe disk cache allocated to CodeQL, the queries haven't completed after 36h. The process stats make it clear that this is a memory bottleneck issue.
I would like to run the analysis on a cloud host with 1024 GiB of RAM. Understandably this is quite expensive, but since this is an occasional one-off job and I don't need guaranteed uptime I can save a lot of money by using spot instances on AWS. Spot instances can be much cheaper per hour (I'm looking at 70-80% savings per hour), but they come with no continuous uptime guarantees - at any point the instance can be automatically stopped (hibernated), migrated to other hardware, then resumed. This is mostly transparent to the instance.
On AWS the persistent storage attached to the instance is Elastic Block Storage (EBS), which is backed by a SAN. This means that all EBS IO goes over the network. While the link is reasonably fast (around 30Gbps) it is nowhere near as performant as local storage, especially for high IOPS tasks like disk cache. AWS also offers instances that come with local NVMe storage, which are much more suited for this type of cache. The downside is that this NVMe storage is ephemeral and will not persist if the spot instance is migrated.
I would like to be able to place the CodeQL disk cache on this NVMe storage since it offers a significant performance increase. However, I can't place the CodeQL database itself on the local NVMe storage because it will not be persisted across migrations. This is why I would like to specify the disk cache path. I can probably hack around this by running an analysis pass with a fast dummy query to generate a valid cache directory, copying the cache data to the NVMe, symlinking the cache directory to the NVMe mount path, then running analysis with the actual queries I want to run, but it would be nice to not have to do all that.
However, this still leaves the question of what happens if a migration occurs mid-query. Since the system is hibernated, moved to a new system, then resumed, it will be as if the contents of the cache directory were deleted mid-run. If CodeQL can't handle this gracefully then using the local NVMe for cache is probably a non-starter.
Is this use-case currently workable within CodeQL? If not, would it be feasible to implement?
- Ngôn ngữ chính
- CodeQL
- Star
- 10.1k
- Fork
- 2.1k
- Merge trung bình
- 2 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 134
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 github/codeql
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
C#: cs/simplifiable-boolean-expression false positive on Nullable<bool> compared with a literal Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
false-positive
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
false-positive
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
Tất cả issue của github/codeql
Issue tương tự
-
documentation improve or update documentation priority/low triage
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 86/100
warpdotdev/docs#782 · 1 bình luận ·
-
EKS 1.35 Support Đang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
gruntwork-io/kubergrunt#281 ·
-
🎙️ task - fix(iam): a single-element condition array permadrifts against the scalar aws stores Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
ehmpathy/declastruct-aws#104 ·
-
enhancement service/sns
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
hashicorp/terraform-provider-aws#50109 · 1 bình luận · 1 reaction ·
-
Product: Azure Policy :shield: Topic: Diagnostic Settings :test_tube: Topic: Policy :pencil:
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 92/100
Azure/Azure-Landing-Zones#4283 · 1 bình luận ·