Files
llm-wiki/raw/official-docs/openjdk-jdk-8196595-container-support.md

93 lines
11 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "OpenJDK JDK-8196595: JVM Container Support & RAM Percentage Flags (Official JDK Documentation)"
source_type: official-doc
url: https://bugs.openjdk.org/browse/JDK-8196595
archive_url:
related_branches: [feature-container-runtime-contract]
related_projects: [ca-skeleton]
tags: [official-doc, ca-skeleton, runtime, docker]
created: 2026-06-14
confidence: medium
---
# OpenJDK JDK-8196595: JVM Container Support & RAM Percentage Flags
> Layer: `raw/` — 외부 자료(공식 문서)의 원문 발췌·출처 기록.
> 검증된 요약은 `/ingest` 후 `wiki/concepts/`에 `source-summary-template` 형식으로 별도 작성. 원본은 raw에 영구 보관.
**Fetch 상태 경고:** 1차 출처 URL (`https://bugs.openjdk.org/browse/JDK-8196595`) 은 HTTP 403 Forbidden 으로 직접 fetch 불가. Web Archive 도 접근 차단됨. 아래 인용과 Claim 은 동일 변경의 내용을 담은 **Oracle 공식 JDK 문서** (JDK 8 / 11 / 17 / 21 Tools Reference, `java.html`) 에서 추출하였으며, OpenJDK HotSpot 소스 (`globals_linux.hpp`, `gcArguments.cpp`) 를 보조 근거로 사용함. `confidence: medium` 으로 하향 조정 — 이슈 트래커 페이지의 Release Note 텍스트를 직접 발췌하지 못했기 때문.
## Parent / 활용 branch
| Branch | 이 자료가 정당화하는 결정 |
|---|---|
| [[raw/branch-notes/feature-container-runtime-contract]] | D4 — JVM 기본값 `-XX:MaxRAMPercentage=75` + `-XX:+UseContainerSupport`: 이 문서는 `UseContainerSupport` 가 기본 활성(default true)이고, `-XX:{Initial,Max,Min}RAMPercentage` 플래그가 container/system 메모리 대비 비율로 Java heap 크기를 제어함을 공식 JDK 문서 수준으로 증명함 |
## 출처 / Source
- 원본 URL: https://bugs.openjdk.org/browse/JDK-8196595 (HTTP 403 — fetch 불가)
- 보조 출처 1 (인용 근거): https://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html (Oracle JDK 8 Tools Reference)
- 보조 출처 2 (인용 근거): https://docs.oracle.com/en/java/javase/11/tools/java.html (Oracle JDK 11 Tools Reference)
- 보조 출처 3 (인용 근거): https://docs.oracle.com/en/java/javase/17/docs/specs/man/java.html (Oracle JDK 17 man page)
- 보조 출처 4 (인용 근거): https://docs.oracle.com/en/java/javase/21/docs/specs/man/java.html (Oracle JDK 21 man page)
- 보조 출처 5 (소스 코드): https://github.com/openjdk/jdk/blob/master/src/hotspot/os/linux/globals_linux.hpp
- 보조 출처 6 (소스 코드): https://github.com/openjdk/jdk/blob/master/src/hotspot/share/gc/shared/gcArguments.cpp
- 저자 / 조직: Oracle / OpenJDK
- 발행일: JDK-8196595 은 JDK 8u191 / JDK 10 에서 통합됨 (2018년)
- 마지막 확인일: 2026-06-14
## 왜 저장했는지 / Why archived
`feature-container-runtime-contract` D4 결정 (`-XX:MaxRAMPercentage=75` 기본값 설정) 이 `UNSUPPORTED_DECISION` 으로 표기되어 있어 공식 근거 source 가 필요했음. JDK-8196595 가 도입한 `UseContainerSupport` 기본 활성 + `{Initial,Max,Min}RAMPercentage` 플래그 존재 및 동작을 Oracle 공식 JDK 문서로 증명함으로써 D4 결정의 근거 강도를 `official-vendor-doc` 수준으로 승급.
## 핵심 인용 / Key quotes (verbatim, 3~5개)
> [JDK 11 java.html, §-XX:-UseContainerSupport] "The VM now provides automatic container detection support, which allows the VM to determine the amount of memory and number of processors that are available to a Java process running in docker containers. It uses this information to allocate system resources. This support is only available on Linux x64 platforms. If supported, the default for this flag is `true`, and container support is enabled by default. It can be disabled with `-XX:-UseContainerSupport`."
> [JDK 8 java.html, §-XX:-UseContainerSupport] "The VM provides automatic container detection support, which enables the VM to determine the amount of memory and number of processors that are available to a Java process running in docker containers. It uses this information to allocate system resources. This support is only available on Linux x64 platforms. If supported, then the default value for this flag is `true` and container support is enabled by default. You can disable it with `-XX:-UseContainerSupport`."
> [JDK 8 java.html, §-XX:InitialRAMPercentage] "Sets the initial amount of memory that the JVM will use for the Java heap before applying ergonomics heuristics as a percentage of the maximum amount determined as described in the `-XX:MaxRAM` option. The default value is 1.5625 percent."
> [JDK 8 java.html, §-XX:MaxRAMPercentage] "Sets the maximum amount of memory that the JVM may use for the Java heap before applying ergonomics heuristics as a percentage of the maximum amount determined as described in the `-XX:MaxRAM` option. The default value is 25 percent."
> [JDK 8 java.html, §-XX:MinRAMPercentage] "Sets the maximum amount of memory that the JVM may use for the Java heap before applying ergonomics heuristics as a percentage of the maximum amount determined as described in the `-XX:MaxRAM` option for small heaps. A small heap is a heap of approximately 125 MB. The default value is 50 percent."
## Claims Extracted / 추출된 주장
| Claim ID | Claim (이 자료가 직접 말하는 것) | Evidence quote | Strength | Applies to | Does not prove |
|---|---|---|---|---|---|
| JDK-8196595-C1 | `UseContainerSupport` 는 기본값 `true` 이며 container 지원이 기본 활성이다. `-XX:-UseContainerSupport` 로 비활성화 가능 | [JDK 11 java.html] "the default for this flag is `true`, and container support is enabled by default. It can be disabled with `-XX:-UseContainerSupport`." | `official-vendor-doc` | Linux x64 플랫폼의 JDK 10+ (JDK 8u191 backport 포함) | Windows/macOS 에서의 동작; cgroup v2 환경에서의 동작은 별도 확인 필요 |
| JDK-8196595-C2 | JVM 은 container 에서 실행 중인 Java 프로세스에 사용 가능한 **메모리 양과 프로세서 수를 결정**하고 이를 시스템 자원 할당에 사용한다 | [JDK 11 java.html] "allows the VM to determine the amount of memory and number of processors that are available to a Java process running in docker containers. It uses this information to allocate system resources." | `official-vendor-doc` | `UseContainerSupport` 가 활성화된 Linux x64 JVM | cgroup 읽기 구현 세부사항 (v1 vs v2 분기); 모든 JVM 배포판 (Temurin, Corretto 등) 이 동일하게 동작함을 직접 증명하지는 않음 |
| JDK-8196595-C3 | `-XX:MaxRAMPercentage` 는 Java heap 이 사용할 수 있는 **최대 메모리를 `-XX:MaxRAM` 기준 비율**로 설정하며, 기본값은 **25%** 이다 | [JDK 8 java.html] "Sets the maximum amount of memory that the JVM may use for the Java heap before applying ergonomics heuristics as a percentage of the maximum amount determined as described in the `-XX:MaxRAM` option. The default value is 25 percent." | `official-vendor-doc` | JDK 8u191+, JDK 10+ | `MaxRAM` 이 container cgroup limit 으로 자동 대체된다는 것을 이 인용 자체가 직접 명시하지는 않음 — `UseContainerSupport` 와 조합 시 container limit 이 `MaxRAM` 기준이 됨은 간접 추론 |
| JDK-8196595-C4 | `-XX:InitialRAMPercentage` 는 ergonomics 적용 전 JVM 이 사용할 **초기 heap 메모리를 `-XX:MaxRAM` 기준 비율**로 설정하며, 기본값은 **1.5625%** 이다 | [JDK 8 java.html] "Sets the initial amount of memory that the JVM will use for the Java heap before applying ergonomics heuristics as a percentage of the maximum amount determined as described in the `-XX:MaxRAM` option. The default value is 1.5625 percent." | `official-vendor-doc` | JDK 8u191+, JDK 10+ | container cgroup limit 과의 직접 연동을 명시한 인용 아님 |
| JDK-8196595-C5 | `-XX:MinRAMPercentage`**소형 heap (약 125 MB)** 에 대해 JVM 이 사용할 최대 메모리를 `-XX:MaxRAM` 기준 비율로 설정하며, 기본값은 **50%** 이다 | [JDK 8 java.html] "Sets the maximum amount of memory that the JVM may use for the Java heap before applying ergonomics heuristics as a percentage of the maximum amount determined as described in the `-XX:MaxRAM` option for small heaps. A small heap is a heap of approximately 125 MB. The default value is 50 percent." | `official-vendor-doc` | JDK 8u191+, JDK 10+ | 대형 heap 에는 `MinRAMPercentage` 가 아닌 `MaxRAMPercentage` 가 적용된다는 경계 기준을 이 인용이 명시적으로 정의하지는 않음 |
## Usage Boundaries / 적용 경계
- 이 자료가 직접 증명하는 것:
- `JDK-8196595-C1`: `UseContainerSupport` 기본 활성 (default true) + 비활성화 플래그 존재
- `JDK-8196595-C2`: JVM 이 docker container 내 메모리/프로세서 제한을 감지하여 자원 할당에 사용함
- `JDK-8196595-C3`: `MaxRAMPercentage` 가 heap 최대 크기를 메모리 비율로 제어하며 기본값 25%
- `JDK-8196595-C4`: `InitialRAMPercentage` 기본값 1.5625%
- `JDK-8196595-C5`: `MinRAMPercentage` 가 소형 heap 에 적용되며 기본값 50%
- 이 자료가 증명하지 않는 것:
- `MaxRAMPercentage=75` 가 최적 비율임을 Oracle 이 권고한다는 주장 — 75% 는 branch D4 의 팀 관행이며 이 문서에서 75% 를 명시적으로 권고하지 않음
- cgroup v2 환경에서 `UseContainerSupport` 가 올바르게 동작함 — JDK 17+ 이슈(`JDK-8230305` 등)와 별도 확인 필요
- Temurin, Corretto, Azul 등 배포판이 동일하게 `UseContainerSupport=true` 기본값을 유지함
- Linux x64 이외 플랫폼 (ARM, Windows, macOS) 에서의 동작
- 내 프로젝트 적용 시 추가 확인이 필요한 것:
- ca-tmpl 컨테이너 환경에서 `Runtime.getRuntime().maxMemory()``container memory limit × 75%` 로 계산되는지 실측 (`Claims To Verify` 참조)
- 사용 JDK 버전/배포판의 `UseContainerSupport` 기본값 실제 확인
## 메모 / Notes
- 이슈 트래커 원본 (`bugs.openjdk.org/browse/JDK-8196595`) 에 직접 접근하지 못해 Release Note 원문을 byte-for-byte 발췌하지 못함. 인용은 동일 변경을 반영한 Oracle 공식 JDK 문서 (java.html) 에서 발췌. 향후 이슈 트래커 접근이 가능해지면 Release Note 원문으로 교체 권장.
- `MaxRAMPercentage``-XX:MaxRAM` 기준 비율 정의 — `UseContainerSupport` 활성 시 JVM 이 cgroup limit 을 `MaxRAM` 으로 인식하므로, container limit × `MaxRAMPercentage` / 100 이 실효 heap 상한이 됨 (간접 추론, `C2` + `C3` 조합).
- `MinRAMPercentage` 의 "소형 heap" 경계는 이 문서에서 "약 125 MB" 로만 명시. 정확한 경계는 HotSpot 소스 (`gcArguments.cpp`) 추가 확인 필요.
- 추가로 봐야 할 동일 출처 페이지: `JDK-8230305` (cgroup v2 지원 개선), `JDK-8272124` (heap 사이징 개선)
## Related / 관련
- 관련 raw official-doc: [[raw/official-docs/redhat-openjdk-container-awareness-java17]] (Red Hat 의 JDK 17 container awareness 해설 — C1~C4 claim 이 본 문서 claim 과 corroborate 관계)
- 이 자료를 인용한 wiki 요약: (생성 시 `[[wiki/concepts/jvm-container-heap-ergonomics]]` 예정)