-
Notifications
You must be signed in to change notification settings - Fork 1
MOSU-395 perf: GC max pause 시간 100ms로 설정 #396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThe Dockerfile's ENTRYPOINT instruction is refactored from a single line to a multi-line array format, adding JVM tuning parameters for garbage collection (G1GC with 100ms pause target) and memory configuration (2GB heap). Existing timezone and urandom settings remain unchanged. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5–10 minutes
Poem
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @wlgns12370, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 Dockerfile에 가비지 컬렉션(GC) 관련 설정을 추가하여 애플리케이션의 성능을 최적화하는 것을 목표로 합니다. G1GC 사용 및 최대 GC 일시정지 시간 제한을 통해 애플리케이션의 응답성과 안정성을 향상시킬 수 있습니다. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
이 PR은 GC 최대 정지 시간을 100ms로 설정하고 G1GC를 활성화하며 힙 크기를 2GB로 고정하여 JVM 성능을 튜닝합니다. 전반적으로 좋은 변경이지만, Dockerfile의 ENTRYPOINT 설정에 대해 몇 가지 개선 제안 사항이 있습니다. Java 21에서는 G1GC가 기본값이므로 관련 플래그는 제거할 수 있으며, 하드코딩된 힙 크기를 환경 변수로 대체하여 유연성을 높이는 것을 고려해볼 수 있습니다.
| ENTRYPOINT [ | ||
| "java", | ||
| "-Duser.timezone=GMT+9", | ||
| "-Djava.security.egd=file:/dev/./urandom", | ||
| "-XX:+UseG1GC", | ||
| "-XX:MaxGCPauseMillis=100", | ||
| "-Xms2g", | ||
| "-Xmx2g", | ||
| "-jar", "/app.war" | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "-Xms2g", | ||
| "-Xmx2g", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
힙 크기(-Xms2g, -Xmx2g)가 하드코딩되어 있습니다. 이렇게 하면 모든 환경에서 동일한 힙 크기를 사용하게 되어 유연성이 떨어질 수 있습니다. 예를 들어, 로컬 개발 환경에서는 더 작은 힙을 사용하고, 프로덕션 환경에서는 더 큰 힙을 사용해야 할 수 있습니다.
Docker 이미지 재빌드 없이 환경에 따라 힙 크기를 조절할 수 있도록 환경 변수를 사용하는 것을 고려해 보세요. 예를 들어, ENTRYPOINT를 쉘 형식으로 변경하고 HEAP_SIZE와 같은 환경 변수를 사용할 수 있습니다:
ENTRYPOINT ["/bin/sh", "-c", "exec java ... -Xms${HEAP_SIZE:-2g} -Xmx${HEAP_SIZE:-2g} ... -jar /app.war"]
✨ 구현한 기능
📢 논의하고 싶은 내용
🎸 기타
Summary by CodeRabbit