master: RSS grows ~1.5 GiB/h over long uptimes until OOM
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
- 30/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ệ
- docker, kubernetes, rust
- Lĩnh vực
- backend, observability, performance
Hướng nghiên cứu
Start by examining the master's metrics endpoint for memory gauges and task counters. Look at the Session cache implementation and Dataset handle lifecycle in the scheduler. The issue suggests instrumenting cache size and handle counts, then testing changes like dropping handles after scans or adjusting allocator settings.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
lance-context-master resident memory climbs roughly linearly with uptime and the process is OOMKilled at the container limit (32 GiB) every 8–20 hours. Observed on a 3-replica deployment at commit 897a536 with COMPACTION_CONCURRENCY=2, TASK_CONCURRENCY=2, COMPACTION_THREADS=4, COMPACTION_MAX_SOURCE_FRAGMENTS=512, ROLLOUT_CACHE_BYTES=2 GiB, MALLOC_ARENA_MAX=2, STATS_SCAN_INTERVAL_SECS=300, ~7,900 experiments in the registry:
| replica | uptime | cgroup memory |
|---|---|---|
| A | 3 h | 11.2 GiB |
| B | 12 h | 23.9 GiB |
| C | 20 h | 28.9 GiB |
Two replicas were OOMKilled in the same window (after 7.5 h and 16 h). Only 2 compaction tasks were running at the time of each kill, so this is not the compaction fan-out that COMPACTION_CONCURRENCY bounds; it is a slow ratchet.
The mango deployment notes already record an earlier round of this ("compact RSS ratcheted up and never released") that was mitigated with MALLOC_ARENA_MAX=2; that helped but did not remove the growth.
What is known / suspects
- Growth is independent of
COMPACTION_CONCURRENCY(2 vs 4 gives the same slope). - Each stats scan touches every experiment (
stats scan complete experiments=7917) and each auto-sweep queues hundreds (auto-sweep queued experiments queued=212,auto merge-wal sweep queued experiments queued=80). Candidates:- per-
Datasetmetadata retained across scans (manifest / fragment lists for thousands of datasets) outside theSessioncache bounded byROLLOUT_CACHE_BYTES; Datasethandles kept alive by the scheduler's task state or the stats store between scans;- allocator retention after large
Compaction task … Read progress N/40000rewrites (theMALLOC_ARENA_MAXmitigation hints this is part of it).
- per-
Proposed next steps
- Chart
process_resident_memory_bytesfrom the master's/metricsover 24 h alongsidemaster_task_*counters to see whether growth is smooth or steps at scan / compaction boundaries. - Add a gauge for the
Sessioncache's actual size and the number of liveDatasethandles, to rule the bounded cache in or out. - If it is retained
Datasetstate: drop/reopen per-experiment handles after each scan, or scope them to the scan. - If it is allocator retention: try
jemallocwith background purging for the master binary, or a periodicmalloc_trim(0)after compaction tasks. - Consider lowering
COMPACTION_MAX_SOURCE_FRAGMENTS(512 → 256) as an interim to cut the per-compaction peak.
Independent of #256–#259 (worker-side WAL merge); filing separately so it is tracked.
- Ngôn ngữ chính
- Rust
- Star
- 89
- Fork
- 21
- Merge trung bình
- 2 giờ 6 phút
- Pull request đã merge (30 ngày)
- 435
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 lance-format/lance-context
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
lance-format/lance-context#832 ·
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
lance-format/lance-context#378 · 119 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 6/100
lance-format/lance-context#333 · 11 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 28/100
lance-format/lance-context#214 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
RolloutStore::dataset should be interior-mutable so merge/compact can refresh the handle without an exclusive lockCó thể đã có người làm @lucyge2022 đã nhận 97 ngày trước. Đang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 42/100
lance-format/lance-context#198 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của lance-format/lance-context
Issue tương tự
-
area:cli area:security bug priority:medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
rtk-ai/rtk#5127 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
status: new topic: ga4gh-sdk type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
comp-rbac
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ClickHouse/ClickHouse#131875 ·
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 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
`gws auth login` keeps the old token cache, so API calls use a token from the previous grantĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
googleworkspace/cli#984 ·
Maintainer thường phản hồi trong vòng 1 ngày