Skip to content

JVM Warm Up Test #108

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

Closed
junha-ahn opened this issue Oct 9, 2023 · 2 comments · Fixed by #138
Closed

JVM Warm Up Test #108

junha-ahn opened this issue Oct 9, 2023 · 2 comments · Fixed by #138
Assignees
Labels
documentation Improvements or additions to documentation major Major topic performanceTest

Comments

@junha-ahn
Copy link
Member

junha-ahn commented Oct 9, 2023

Description

아래 두가지 자료를 참고

테스트 시나리오

  1. Application Pod 실행 후 테스트
  2. 동일 테스트 재시도
  3. 결과 비교

동일한 테스트를 두번 진행하는 것으로, 가장 단순하게 Warm up을 구현했다.

인프라 환경 등은 큰 의미를 가지지 않기에 기재하지 않는다.

@junha-ahn junha-ahn added documentation Improvements or additions to documentation performanceTest labels Oct 9, 2023
@junha-ahn
Copy link
Member Author

junha-ahn commented Nov 7, 2023

[Kakao tech] JVM warm up

JIT Compiler는 머신 코드를 캐시에 저장해서 성능 향상을 이룬다.

image

애플리케이션 시작 단계에서 캐싱이 없기 때문에, 의도적으로 미리 로직을 실행하여 캐싱되도록 하는 Warm up 절차를 도입하자.

  • 현재 프로젝트에서 Autoscsale을 진행하지 않지만, 그럼에도 Warm up 결과를 단순히 비교하는 것은 의미있다고 생각한다.
image

최대 최적화 임계치까지 메소드를 호출

image

warm up 이전 livenessProbe 400 응답, 이후 200 응답 (autoscale을 진행하지 않기에 해당 작업 X)

@junha-ahn
Copy link
Member Author

junha-ahn commented Nov 7, 2023

배포 후 테스트

JVM

image
  • profiled codeheap: 수명이 짧고 가볍게 최적화
  • non-profiled codeheap: 수명이 길고 완전히 최적화
  • 붉은색은 1차 테스트 구간 , 주황색은 2차 테스트 구간, 초록색은 3차 테스트 구간

Latency

image

점차 개선되는 Latency를 확인 가능하다. (최고점도 다르다)

K6

req_duration p(95) 값이 425 => 220 => 160 으로 점차 개선됨을 확인 가능하다

  • 첫번째 테스트 이후 (JVM Warm up) 가장 크게 개선되었다.

1차

image

2차

image

3차

image

결론

JVM Warm up을 통해 초기 Latency 지연을 개선 가능성을 가장 단순화된 테스트로 검증하였다

다만 현재 프로젝트에서 JVM Warm up을 진행하지는 않는다.

추가 참고 자료

@junha-ahn junha-ahn self-assigned this Nov 7, 2023
@junha-ahn junha-ahn added the major Major topic label Nov 7, 2023
@junha-ahn junha-ahn moved this to In Progress in Kanban Infra Nov 7, 2023
@junha-ahn junha-ahn moved this to In Progress in Kanban backend Nov 7, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Kanban Infra Nov 10, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Kanban backend Nov 10, 2023
@junha-ahn junha-ahn linked a pull request Nov 10, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation major Major topic performanceTest
Projects
Status: Done
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant