node-mixin: Adjust `memory used` Dashboard to use `MemAvailable`
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 75/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- linux, prometheus
- Lĩnh vực
- observability
Hướng nghiên cứu
Issue chỉ ra tệp cụ thể docs/node-mixin/lib/prom-mixin.libsonnet dòng 126-137 và tệp quy tắc docs/node-mixin/rules/rules.libsonnet. Bắt đầu bằng cách kiểm tra công thức bảng điều khiển bộ nhớ đã sử dụng hiện tại và quy tắc sử dụng bộ nhớ hiện có đã sử dụng MemAvailable. Nhiệm vụ là cập nhật công thức bảng điều khiển để sử dụng MemAvailable với phương án dự phòng là tính toán cũ để tương thích. Xác minh thay đổi bằng cách kiểm tra cấu trúc mixin JSONnet và hiểu cách các truy vấn Prometheus được xây dựng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Currently, the memory used dashboard in the node-mixin for Linux uses the formula
\text{memory used} = \text{MemTotal} - \text{MemFree} - \text{Buffers} - \text{Cached}
The Linux kernel introduced MemAvailable specifically because the formula above is a less accurate estimation of usable memory. As a result, a more accurate number for memory usage would be
\text{memory used} = \text{MemTotal} - \text{MemAvailable}
We encouraged gopsutil to adopt the same formula to calculate usage and psutil adopted it at coincidentally the same time (but independent of our gopsutil suggestion).
I see that the memory utilization dashboard already accounts for this: https://github.com/prometheus/node_exporter/blob/125a02099cde708ee9c99fddcc29a2703e92c576/docs/node-mixin/rules/rules.libsonnet#L43-L58
Should the memory used dashboard do the same thing? I assume if it did something like this:
node_memory_MemTotal_bytes{%(nodeExporterSelector)s} - (
node_memory_MemAvailable_bytes{%(nodeExporterSelector)s}
or
(
node_memory_Buffers_bytes{%(nodeExporterSelector)s}
+
node_memory_Cached_bytes{%(nodeExporterSelector)s}
+
node_memory_MemFree_bytes{%(nodeExporterSelector)s}
)
)
That would make it so users on Linux environments that don't provide MemAvailable wouldn't be broken, but the rest could get a more accurate value that is similar to the calculation already being done in the utilization dashboard.
P.S. The way free used to calculated this in the past also included SReclaimable as part of the calculation alongside Cached, Buffers, and MemFree, and gopsutil used to do the same thing. I'm unsure whether it's worth it at this point to mess with the existing approximation formula in the dashboard, but I figured I would bring it up.
- Ngôn ngữ chính
- Go
- Star
- 13.8k
- Fork
- 2.7k
- Merge trung bình
- 1 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 7
Chuẩn bị môi trường
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 prometheus/node_exporter
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
prometheus/node_exporter#3823 ·
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 78/100
prometheus/node_exporter#3817 ·
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 76/100
prometheus/node_exporter#3761 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
prometheus/node_exporter#1767 ·
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
prometheus/node_exporter#3832 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của prometheus/node_exporter
Issue tương tự
-
agent-butler-finding chore
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
jordansmall/spindrift#4146 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
IBM/ibmcloud-volume-file-vpc#119 ·
-
security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
IBM/networking-go-sdk#339 ·
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 88/100
kubernetes-sigs/mcp-lifecycle-operator#439 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: global bug dx priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày