91 lines
8.8 KiB
Markdown
91 lines
8.8 KiB
Markdown
---
|
|
title: "Java 17: What's new in OpenJDK's container awareness (Red Hat Developer)"
|
|
source_type: official-doc
|
|
url: https://developers.redhat.com/articles/2022/04/19/java-17-whats-new-openjdks-container-awareness
|
|
archive_url:
|
|
related_branches: [feature-container-runtime-contract]
|
|
related_projects: [ca-skeleton]
|
|
tags: [official-doc, ca-skeleton, runtime, kubernetes, thread-pool]
|
|
created: 2026-06-14
|
|
---
|
|
|
|
# Java 17: What's new in OpenJDK's container awareness (Red Hat Developer)
|
|
|
|
> Layer: `raw/` — 외부 자료(공식 문서 / 대기업 기술 블로그)의 **원문 발췌·출처 기록**.
|
|
> 검증된 요약은 `/ingest` 후 `wiki/concepts/`에 `source-summary-template` 형식으로 별도 작성. 원본은 raw에 영구 보관.
|
|
|
|
## Parent / 활용 branch
|
|
|
|
| Branch | 이 자료가 정당화하는 결정 |
|
|
|---|---|
|
|
| [[raw/branch-notes/feature-container-runtime-contract]] | **D4** — `-XX:MaxRAMPercentage=75` rationale: Red Hat (primary OpenJDK contributor/LTS steward) documents that `MaxRAMPercentage` is the percentage of container memory limit (default 25%), the cgroup v1/v2 support boundaries by JDK version, and how container limits drive heap/GC/thread-pool ergonomics. |
|
|
|
|
## 출처 / Source
|
|
|
|
- 원본 URL: https://developers.redhat.com/articles/2022/04/19/java-17-whats-new-openjdks-container-awareness
|
|
- 아카이브 URL: (미등록 — archive.org 스냅샷 보강 권고)
|
|
- 저자 / 조직: Red Hat Developer (primary OpenJDK contributor / Eclipse Temurin LTS steward)
|
|
- 발행일: 2022-04-19
|
|
- 마지막 확인일: 2026-06-14
|
|
|
|
## 왜 저장했는지 / Why archived
|
|
|
|
`feature-container-runtime-contract` D4 결정(`-XX:MaxRAMPercentage=75`)의 근거 부재를 해소하기 위해 보관. Red Hat은 OpenJDK 주요 기여자이자 Eclipse Temurin LTS 스튜어드로서, `MaxRAMPercentage`의 기본값(25%), cgroup v1/v2 지원 JDK 버전 경계, 그리고 container 제한이 GC 알고리즘 선택·기본 heap 크기·thread pool·ForkJoinPool 병렬성에 미치는 영향을 직접 문서화하고 있다.
|
|
|
|
## 핵심 인용 / Key quotes (verbatim, 3~5문장)
|
|
|
|
> [§Key Tuning Options] "Maximum percentage of real memory used for maximum heap size. Default value: 25"
|
|
|
|
> [§cgroups v2 Support] "Since Java 15, OpenJDK detects the cgroup version in use and detects limits according to cgroup version-specific settings."
|
|
|
|
> [§cgroups v2 Support] "As of this writing, OpenJDK 17, OpenJDK 11.0.16+ and OpenJDK 8u372+ are the only long-term support releases that support both cgroups v1 and cgroups v2 configurations."
|
|
|
|
> [§Why Container Awareness Matters / Resource limits] "OpenJDK detects whether certain resource quotas are in place when running in a container and, if so, uses those bounds for its operation. These resource limits affect, for example, the garbage collection (GC) algorithm selected by the JVM, the default size of the heap, the sizes of thread pools, and how default parallelism is determined for `ForkJoinPool`."
|
|
|
|
## Claims Extracted / 추출된 주장
|
|
|
|
> 이 자료가 **직접 말하는 것만** claim 으로 분리한다. 내 프로젝트에 적용한 결론은 여기 쓰지 않는다.
|
|
> Red Hat은 OpenJDK 주요 기여자(vendor)이나 본 문서는 Red Hat의 분석이며 중립적 사양(spec)이 아님.
|
|
|
|
| Claim ID | Claim (이 자료가 직접 말하는 것) | Evidence quote | Strength | Applies to | Does not prove |
|
|
|---|---|---|---|---|---|
|
|
| RHAT-JCONT-C1 | `-XX:MaxRAMPercentage` 의 기본값은 25%이며, 이는 container 또는 real memory 의 최대 heap 비율을 설정한다 | [§Key Tuning Options] "Maximum percentage of real memory used for maximum heap size. Default value: 25" | `official-vendor-doc` | OpenJDK 17 (본 문서의 대상 버전), `UseContainerSupport` 활성 환경 | 75%가 최적값임을 증명하지 않음; 기본값 25%에서 75%로 올리는 것이 항상 안전함을 증명하지 않음 |
|
|
| RHAT-JCONT-C2 | Java 15부터 OpenJDK는 사용 중인 cgroup 버전을 자동 감지하고 버전별 설정에 따라 limit 을 인식한다 | [§cgroups v2 Support] "Since Java 15, OpenJDK detects the cgroup version in use and detects limits according to cgroup version-specific settings." | `official-vendor-doc` | OpenJDK 15 이상 | Java 15 미만은 해당 없음; 모든 cgroup v2 설정이 자동으로 올바르게 감지됨을 보장하지 않음 |
|
|
| RHAT-JCONT-C3 | cgroup v1 및 v2 모두 지원하는 LTS 버전은 OpenJDK 17, 11.0.16+, 8u372+뿐이다 (본 문서 작성 시점 기준) | [§cgroups v2 Support] "As of this writing, OpenJDK 17, OpenJDK 11.0.16+ and OpenJDK 8u372+ are the only long-term support releases that support both cgroups v1 and cgroups v2 configurations." | `official-vendor-doc` | 2022-04-19 시점 기준 OpenJDK LTS 버전 | 이후 버전(21, 25 등)의 cgroup v2 지원 여부는 이 문서만으로 판단 불가; "as of this writing" 표현으로 시점 한정 |
|
|
| RHAT-JCONT-C4 | container 내 resource limit(cgroup)은 JVM이 선택하는 GC 알고리즘, 기본 heap 크기, thread pool 크기, ForkJoinPool 병렬성 기본값에 직접 영향을 미친다 | [§Why Container Awareness Matters] "OpenJDK detects whether certain resource quotas are in place when running in a container and, if so, uses those bounds for its operation. These resource limits affect, for example, the garbage collection (GC) algorithm selected by the JVM, the default size of the heap, the sizes of thread pools, and how default parallelism is determined for `ForkJoinPool`." | `official-vendor-doc` | `UseContainerSupport` 활성 상태(JDK 10+ 기본값)인 모든 컨테이너 환경 | 정확한 GC 알고리즘 선택 임계값이나 thread pool 산식 자체를 이 문서가 명시하지는 않음 |
|
|
|
|
### Strength 허용값 (참고)
|
|
|
|
- `official-vendor-doc` — Spring, Keycloak, AWS, Google, Red Hat 등 공식 벤더 문서 (본 문서 적용)
|
|
|
|
> **주의**: 이 문서는 Red Hat의 OpenJDK 분석 아티클이며, OpenJDK 공식 사양(JEP, JDK Release Notes)과는 별개다. Claims는 `official-vendor-doc` 강도이며, `official-standard`가 아님. 75%를 선택한 것은 D4의 team 결정이고, 본 문서는 "기본값이 25%"임과 "container limit이 ergonomics에 영향을 준다"는 사실만 지지한다.
|
|
|
|
## Usage Boundaries / 적용 경계
|
|
|
|
- 이 자료가 직접 증명하는 것:
|
|
- `RHAT-JCONT-C1`: `-XX:MaxRAMPercentage` 기본값이 25%이며 container/real memory 비율로 작동함
|
|
- `RHAT-JCONT-C2`: Java 15부터 cgroup 버전 자동 감지가 OpenJDK 기본 동작
|
|
- `RHAT-JCONT-C3`: cgroup v1+v2 동시 지원 LTS = OpenJDK 17, 11.0.16+, 8u372+ (2022년 4월 기준)
|
|
- `RHAT-JCONT-C4`: cgroup resource limit이 GC 알고리즘·heap·thread pool·ForkJoinPool 결정에 영향을 줌
|
|
- 이 자료가 증명하지 않는 것:
|
|
- 75%가 최적 또는 안전한 `MaxRAMPercentage` 값임 (D4의 75% 선택은 team-convention)
|
|
- Java 21+에서의 cgroup v2 지원 세부 사항 (2022년 발행 문서이므로 시점 한정)
|
|
- `UseContainerSupport`를 명시하지 않을 때의 기본 활성 여부 (JDK 10+ 기본값이라는 내용은 본 문서에서 명시되나, 특정 배포판 변형에서의 동작 보장은 별도 확인 필요)
|
|
- 내 프로젝트에 적용하려면 추가 확인이 필요한 것:
|
|
- ca-tmpl/ca-skeleton 실제 container 환경에서 `-XX:MaxRAMPercentage=75` 적용 시 `Runtime.getRuntime().maxMemory()`가 container limit의 75%로 설정되는지 `locally-verified` 등급 테스트 필요 (`Claims To Verify` 항목)
|
|
- Eclipse Temurin 배포판 기준 `UseContainerSupport` 기본값 활성 확인 (OpenJDK contributor로서 Red Hat 문서가 근거가 되나, Temurin 공식 릴리즈 노트로 교차 확인 권고)
|
|
|
|
## 메모 / Notes
|
|
|
|
- 본 아티클은 2022-04-19 발행. Java 21 LTS (2023-09-19)와 그 이후 버전의 cgroup 지원 세부 내용은 이 문서로 커버되지 않는다. JDK 21+ 용 별도 source 보강 권고.
|
|
- `RHAT-JCONT-C1`이 D4(75% 결정)의 직접 근거: "기본값이 25%인데 우리는 75%를 선택했다"는 의사결정 맥락을 뒷받침. 75% 선택의 근거 자체는 team 경험치 기반이므로 `UNSUPPORTED_DECISION` 라벨이 D4에 남아있는 것이 적절하다 — 본 source는 "값의 의미와 기본값"을 증명하며, "75%가 왜 최적인가"는 추가 벤치마크 또는 Red Hat production guidance 등이 필요.
|
|
- 추가로 봐야 할 동일 출처 페이지: Red Hat JDK 17 release blog, Eclipse Temurin 공식 container guidance, OpenJDK JEP 관련 문서.
|
|
|
|
## Related / 관련
|
|
|
|
- 같은 주제 다른 official-doc / company-tech-blog:
|
|
- [[raw/official-docs/container-distroless-google-github]] — base image 선택 근거
|
|
- [[raw/official-docs/container-alpine-java-musl-tradeoffs]] — Alpine + musl 대안
|
|
- [[raw/official-docs/container-graalvm-native-image-spring-boot]] — GraalVM Native Image 대안
|
|
- 이 자료를 인용한 wiki 요약: (생성 시 추가 예정)
|