Warn users if multicore summarise_draws risks exhausting available ram

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

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
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
r
Lĩnh vực
performance

Hướng nghiên cứu

Bắt đầu từ đường dẫn multicore của summarise_draws và kiểm tra cách các dependency của package được khai báo, đặc biệt là liệu có thể thêm memuse dưới dạng dependency được đề xuất hay không. Xác định hành vi cảnh báo RAM và hành vi opt-out được mô tả trong issue, sau đó xác minh rằng các lần chạy multicore sẽ cảnh báo khi bộ nhớ ước tính vượt quá RAM khả dụng và vẫn tiếp tục khi cơ chế an toàn bị vô hiệu hóa.

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

Mô tả

documentation efficiency

My first big test of multicore summarise_draws on a really big (~9 GB in memory) array plowed straight into the swap on my 40 GB machine and I had to kill it. Second test, after reducing cores from 4 to 3, was awesome!

If a naive user runs their big model for days and then overenthusiastically runs summarise_draws prior to saving, they could be in a world of hurt.

Given that the main use case for multicore processing with summarise_draws involves really big draws arrays, we could consider adding a .ram_safety = TRUE argument, and then doing:

if (.cores > 1 & .ram_safety & (memuse::memuse(object.size(x)) > (memuse::Sys.meminfo()$totalram / (.cores + 1)))) {
  warning(paste("The memory requirements of multi-core processing with", .cores, "cores may exceed the RAM on your system.",
                "Consider using fewer cores. If you wish to proceed with", .cores, "cores, set `.ram_safety = FALSE`",
                "and save any important objects prior to running."))
} else {
  # Do the computation
}

Main drawback is the extra package requirement for multicore (which could go in suggests).

Ngôn ngữ chính
R
Star
172
Fork
27
Merge trung bình
5 ngày 12 giờ
Pull request đã merge (30 ngày)
5

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

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 stan-dev/posterior

Tất cả issue của stan-dev/posterior

Issue tương tự

Thêm issue về R

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.