Two dynamic off-heap sizing bugs: MinHeapFreeRatio not restored, availability metric reads the wrong pools

Đang mở
#13,093 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
65/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ệ
scala
Lĩnh vực
backend, performance

Hướng nghiên cứu

Start with DynamicOffHeapSizingMemoryTarget.shrinkOnHeapMemory and inspect its finally block, then trace SparkMemoryUtil.getCurrentAvailableOffHeapMemory and the GlobalOffHeapMemoryTarget callers. Verify the dynamic sizing path restores both heap ratios and reports the pools used for global reservations, including the Velox columnar shuffle writer's memLimit behavior.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Both bugs are in the dynamic off-heap sizing path, gated by spark.gluten.memory.dynamic.offHeap.sizing.enabled (experimental, off by default), so they only affect deployments that opt into that flag.

1. MinHeapFreeRatio is never restored after a heap shrink. DynamicOffHeapSizingMemoryTarget.shrinkOnHeapMemory lowers both MinHeapFreeRatio and MaxHeapFreeRatio so the JVM releases committed heap, but the finally block restores only MaxHeapFreeRatio. After the first shrink the executor keeps MinHeapFreeRatio=5 for the rest of its life. The heap then stays tighter and the JVM GCs more often, well after the off-heap pressure that triggered the shrink has passed.

2. The available off-heap metric reads the wrong pools under dynamic sizing. SparkMemoryUtil.getCurrentAvailableOffHeapMemory sums the off-heap storage and execution pools. Under dynamic sizing, Gluten charges its global reservations to the on-heap pools (GlobalOffHeapMemoryTarget acquires with ON_HEAP) and the driver plugin forces spark.memory.offHeap.size=0, so the off-heap pools are empty and the method returns 0. The Velox columnar shuffle writer uses that value as its memLimit, so it drops to the minimum buffer size.

Ngôn ngữ chính
Scala
Star
1.6k
Fork
685
Merge trung bình
4 ngày 16 giờ
Pull request đã merge (30 ngày)
84

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/gluten

Tất cả issue của apache/gluten

Issue tương tự

Thêm issue về Scala

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.