More Related Content
Similar to [D2]java 성능에 대한 오해와 편견 (20)
[D2]java 성능에 대한 오해와 편견
- 2. 1. Java는 정말 느린가?
2. 무엇 때문에 느린가?
3. 느리지 않게 하기
4. 다시 한번 질문하기 : Java는 정말 느린가?
- 11. 7
대외비
1. Java는 정말 느린가?
이미지 출처 : http://www.yes24.com/24/goods/8262373?scode=032OzSrank=1
- 79.
[{id:4174,randomNumber:331},{id:51,randomNumber:6544},{id:4462,randomNumber:952},{id:2221,randomNumber:532},
{id:9276,randomNumber:3097},{id:3056,randomNumber:7293},{id:6964,randomNumber:620},{id:675,randomNumber:6601},
{id:8414,randomNumber:6569},{id:2753,randomNumber:4065}]
출처 : http://www.techempower.com/benchmarks/#section=data-r10hw=peaktest=query
- Top
- 122.
[{id:4174,randomNumber:331},{id:51,randomNumber:6544},{id:4462,randomNumber:952},{id:2221,randomNumber:532},
{id:9276,randomNumber:3097},{id:3056,randomNumber:7293},{id:6964,randomNumber:620},{id:675,randomNumber:6601},
{id:8414,randomNumber:6569},{id:2753,randomNumber:4065}]
출처 : http://www.techempower.com/benchmarks/#section=data-r10hw=peaktest=update
- Top
- 160. (STW)
- GC를 실행하기 위해 Java 세상을 얼려버림(조건발동)
- 지속시간 : 랜덤
GC
이미지 출처 : http://qbguy.tistory.com/657
- 412. 크리티컬 섹션을 광범위하게 사용하는 애플리케이션이다.
출처 : http://bugs.java.com/view_bug.do?bug_id=6896647
- Changes
- 766. 40
대외비
2. 무엇 때문에 느린가?
64비트 운영체제 + 64비트 JVM이라면
힙메모리를 필요에 따라
2G이상 사용할 수 있다.
(CMS,
- 768. 41
대외비
2. 무엇 때문에 느린가?
단, 웹애플리케이션의 경우 힙메모리를
2G이상 할당하는 경우는 드물고,
Elasticsearch나 HBase 같은 솔루션들
은 수십G를 사용하기도 한다.
확 인 됨
GC
- 773.
GC가 수 초씩 걸린다면 그때마다 응답지연이나 실패가 일어날
텐데 어떻게 상용 서비스에서 사용할 수 있을까요?
Java를 잘 모르는 1인
GC
이미지 출처 :
- 812. milliseconds
- 서버 환경
출처 : https://software.intel.com/en-us/blogs/2014/06/18/part-1-tuning-java-garbage-collection-for-hbase
GC
- 813. 52
대외비
2. 무엇 때문에 느린가?
- 개선 전
출처 : https://software.intel.com/en-us/blogs/2014/06/18/part-1-tuning-java-garbage-collection-for-hbase
GC
- 814. 53
대외비
2. 무엇 때문에 느린가?
- 개선 전
출처 : https://software.intel.com/en-us/blogs/2014/06/18/part-1-tuning-java-garbage-collection-for-hbase
GC
- 816. 버전 변경)
출처 : https://software.intel.com/en-us/blogs/2014/06/18/part-1-tuning-java-garbage-collection-for-hbase
GC
- 818. 버전 변경)
출처 : https://software.intel.com/en-us/blogs/2014/06/18/part-1-tuning-java-garbage-collection-for-hbase
GC
- 827. 61
대외비
2. 무엇 때문에 느린가?
장까지 살아서 일렬로 하나씩…⋯
IO
이미지 출처 : http://blog.naver.com/binna77/20071585806
- 828. 62
대외비
2. 무엇 때문에 느린가?
출처 : https://blogs.oracle.com/slc/entry/javanio_vs_javaio
IO
- 1041. 69
대외비
2. 무엇 때문에 느린가? IO
출처 : http://www.javaworld.com/article/2076241/build-ci-sdlc/tweak-your-io-performance-for-faster-runtime.html
Sun
- 1046. 1.3
RawBytes 20.6 18.0 26.1 20.70 62.70
RawChars 100.0 235.0 174.0 438.00 148.00
BufferedIS 9.2 1.8 8.6 2.28 2.65
BufferedR 16.7 2.4 10.0 2.84 3.10
SelfBufferedIS 2.1 0.4 2.0 0.61 0.53
SelfBufferedR 8.2 0.9 2.7 1.12 1.17
- Runtimes
- 1054. 70
대외비
2. 무엇 때문에 느린가?
버퍼를 쓰지 않으면
아주 느린 것은 사실이다.
하지만 버퍼를 활용함으써
성능 향상을 기대할 수 있다.
IO
확 인 됨
- 1100. 방식 / 메모리 크기 지정
결과 분석
반영 및 종료
GC
• JStat 명령어로 확인하자
1. YGC(Young
- 1125. 방식 / 메모리 크기 지정
결과 분석
반영 및 종료
GC
• 해당 시스템이 가져야 할 목표와 비교하자
(예시)
1. Minor
- 1136. 방식 / 메모리 크기 지정
결과 분석
반영 및 종료
GC
1. GC
- 1162. Guide’도 참고하자
참고 : http://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/index.html
- 1166. 방식 / 메모리 크기 지정
결과 분석
반영 및 종료
GC
• 다음과 같은 사항을 확인하자
1. GC
- 1175. 방식 / 메모리 크기 지정
결과 분석
반영 및 종료
GC
• 결과에 만족한다면 해당 시스템의 전체 서
버에 적용한다
• JVM