Missing cgroup awareness
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- c, kubernetes, linux
- Lĩnh vực
- operating-systems, performance
Hướng nghiên cứu
Start with the code that determines the value returned by openblas_get_num_threads(), then reproduce the issue with the provided systemd-run CPUQuota command. Compare the needed cgroup parsing with the referenced num_cpus Linux implementation and decide which cgroup versions are in scope. Done means a quota-limited container reports its available CPU count rather than the physical count.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
There are a variety of ways cgroups can restrict CPU availability, and OpenBLAS does not know about all of them.
Without knowing about these restrictions, the result can be code running in a container (e.g. Kubernetes pod) thinking it has far more cores than it actually does, since it will choose the physical CPU count instead of the restricted access the container has been given. This can cause oversaturation and slowness.
To try this out, you can run a program that checks openblas_get_num_threads() under a container created with systemd-run:
systemd-run --user --scope --property CPUQuota="200%" -- yourprogram --yourarg=yourvalue
The program should only have 2 cores, but will in fact report the number of physical cores on the CPU instead.
You can see logic for cgroups parsing (it's on the filesystem) in https://github.com/seanmonstar/num_cpus/blob/master/src/linux.rs for example.
(Not sure if cgroups v1 is worth supporting at this point, since it's old.)
(I validated this with the threadpoolctl Python library.)
- Ngôn ngữ chính
- C
- Star
- 7.6k
- Fork
- 1.7k
- Merge trung bình
- 1 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 57
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 OpenMathLib/OpenBLAS
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
OpenMathLib/OpenBLAS#6084 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
OpenMathLib/OpenBLAS#6089 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
OpenMathLib/OpenBLAS#6073 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
OpenMathLib/OpenBLAS#6069 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
OpenMathLib/OpenBLAS#6029 · 21 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của OpenMathLib/OpenBLAS
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 94/100
-
feature request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
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 82/100