Revisit Solr JVM GC flags: pinned young generation disables the G1 pause-time goal; collect GC logs under load
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
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- helm, java, kubernetes
- Lĩnh vực
- infrastructure, performance, search
Hướng nghiên cứu
Start by reading helm/name-lookup/values.yaml and checking how the chart’s JVM flags reach the Solr pod. Enable the proposed G1 GC logging and capture logs under representative query load, then compare pause distributions, GC types, allocation rate, and time in GC for the current and de-pinned flags. Done means the load data supports a documented GC flag and heap configuration; the issue does not identify a specific test or provide representative load instructions.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
The Solr JVM GC flags used by the NameRes Helm chart (helm/name-lookup/values.yaml) look cargo-culted and are internally contradictory: they pin the G1 young generation to a fixed size and set G1's adaptive young-gen percentages, which cannot both apply. Pinning the young gen also silently disables the MaxGCPauseMillis pause-time goal — so the one latency knob in the config does nothing.
Before changing flags I'd like to collect GC logs under representative load, since the current production picture can't be assessed from a status snapshot alone.
Current config
heap_mem: "-Xmx12G" # note: no -Xms
gc: "-XX:NewSize=4G -XX:MaxNewSize=4G -XX:+UseG1GC -XX:MaxGCPauseMillis=1000 \
-XX:+UnlockExperimentalVMOptions -XX:G1MaxNewSizePercent=40 -XX:G1NewSizePercent=5 \
-XX:G1HeapRegionSize=32M -XX:InitiatingHeapOccupancyPercent=90"
Observations
1. Pinned young gen contradicts adaptive sizing and disables the pause goal.
-XX:NewSize=4G -XX:MaxNewSize=4G fixes the young generation, which (a) overrides -XX:G1NewSizePercent=5 -XX:G1MaxNewSizePercent=40 (they're effectively dead), and (b) per the HotSpot G1 docs, setting an explicit young-gen size disables the -XX:MaxGCPauseMillis pause-time heuristic. So MaxGCPauseMillis=1000 is inert, and we've opted out of G1's main strength (adaptive young-gen sizing to hit a pause target).
2. InitiatingHeapOccupancyPercent=90 disables adaptive IHOP (default since JDK 9) and starts concurrent marking very late (90% occupancy). Combined with a large heap this is usually fine, but it removes a safety margin against evacuation failures during allocation spikes.
3. The deployed heap doesn't match the chart default. Live status from https://name-lookup.ci.transltr.io/status?full=true (sampled 2026-06-02) reports heap.max ≈ 30 GB, not the -Xmx12G in values.yaml. We should reconcile what the CI/test/prod instances actually run. A 30 GB heap in a 32 GiB container leaves almost nothing for the OS page cache, which matters because the 142 GB index is mmap'd (this is the same page-cache concern tracked in #265 / #267).
4. Live heap is heavily underutilized — heap.used ≈ 3.86 GB / 30 GB (12.9%) — but the instance was idle at sampling (SystemCpuLoad 0.0, ~17K cache lookups since a 2026-05-15 start), so this only tells us the idle live set is small, not how the JVM behaves under load.
For reference, the same snapshot confirms the queryResultCache problem from #266 is real and worse than first reported: 12.99% hit ratio, 14,665 evictions, size 512, while filterCache is healthy (99.92% hit, 15 entries).
Proposed direction (pending GC-log validation)
- Stop pinning the young generation — drop
-XX:NewSize/-XX:MaxNewSizeand let G1 size it adaptively against the pause target. KeepG1NewSizePercent/G1MaxNewSizePercentas bounds or drop them and let G1 self-tune. - Lower
MaxGCPauseMillistoward the 200 ms default once it actually takes effect (search is latency-sensitive). - Let IHOP go adaptive (remove
=90) or set a more conventional value. - Set
-Xms==-Xmxto avoid runtime heap resizing. - Reconcile heap size with the page-cache goal — the chart's 12 GB default leaves ~20 GB for page cache and is almost certainly better than a 30 GB heap; live data shows the live set is only a few GB.
Data to collect to settle this
Enable G1 GC logging on a Solr pod and capture under representative query load:
-Xlog:gc*,gc+heap=info,gc+age=trace:file=/var/solr/logs/gc.log:time,uptime,level,tags:filecount=10,filesize=20M
Then compare current flags vs. the de-pinned config on:
- GC pause distribution (p50/p99) and pause frequency
- young vs. mixed GC counts; any Full GCs or to-space/evacuation failures
- allocation rate and % time in GC
- effect of heap size on OS page-cache occupancy (ties into #267's
/proc/meminfoexposure)
Related: #265 (heap reduction), #266 (queryResultCache), #267 (OS memory visibility).
- Ngôn ngữ chính
- Python
- Star
- 5
- Fork
- 4
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
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 NCATSTranslator/NameResolution
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 43/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 66/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Tất cả issue của NCATSTranslator/NameResolution
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
benchflow-ai/skillsbench#1090 ·
-
Missing unit tests for human-readable date/time formatters in utils/datetime.pyCó thể đã có người làm @prabhleen2317 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
apache/iceberg-python#4387 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] Hermes MCP adapter drops cwd, extra passthrough keys and the SSE transport when writing config.yamlCó thể đã có người làm @Parth-Vasave đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
microsoft/apm#3749 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
backend bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
NVIDIA/numba-cuda-mlir#467 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày