사용자 도구

사이트 도구


java:8:migration

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
java:8:migration [2016/08/17 09:27]
kwon37xi
java:8:migration [2016/09/24 14:42] (현재)
kwon37xi
줄 8: 줄 8:
   * [[java:equals_verifier|Equals Verifier]] 2.x 버전 사용해야함.   * [[java:equals_verifier|Equals Verifier]] 2.x 버전 사용해야함.
   * [[http://x-stream.github.io/|xstream]] xstream 1.4.9 버전 이상 사용.   * [[http://x-stream.github.io/|xstream]] xstream 1.4.9 버전 이상 사용.
 +
 +===== TieredCompilation =====
 +  * [[http://docs.oracle.com/javase/7/docs/technotes/guides/vm/performance-enhancements-7.html#tieredcompilation|Tiered Compilation]] 이 기본값으로 변경되었다.
 +  * 일반적으로는 성능상 유리한 것이지만, JVM을 연속적으로 계속해서 실행하는 경우 이로 인해 초기 구동시 CPU 점유율이 높아지는 듯.
 +  * ''-XX:-TieredCompilation'' 옵션을 추가하여 기능을 끈다.
 +  * [[http://ispyker.blogspot.kr/2015/07/java-8-tiered-compilation-big-pro-and.html|iSpyker (Performance, Cloud, Containers and Beyond): Java 8 Tiered Compilation, big pro and small con]]
 +  * [[http://blog.orbeon.com/2015/08/a-dangerous-java-7-jvm-option.html|Orbeon Forms — Forms Everywhere: A dangerous Java 7 JVM option: TieredCompilation]]
 +===== DNS Resolve 문제 =====
 +  * 두가지 문제가 있어보인다.
 +
 +==== localhost 이름을 잘못 읽어오는 문제 ====
 +  * [[https://bugs.openjdk.java.net/browse/JDK-8062840|[JDK-8062840] InetAddress.getLocalhost() does not give same result in java7 and java8]] : 버그가 아니라 Java 8의 행위가 옳다고 봄.
 +  * 제일 빠른 해결책은 ''/etc/hosts''에 해당 서버에 대한 올바른 IP/hostname 을 넣어주면 된다.
 +  * 혹은 아래 내용에 따라 ''/etc/nsswitch.conf''의 설정을 수정하는 방법
 +
 +> The newer calls respect the localhosts /etc/nsswitch.conf configuration files. In the case of this machine that file tells these calls to look in files before referencing other naming services.
 +> Since the /etc/hosts file contains an explicit mapping for this hostname / IP combination, that is what is returned.
 +> In the older JDK's the gethostbyname_r actually ignored the local machines settings and immediately delegated to the naming service.
 +
 +> 신규 버전은 /etc/nsswitch.conf 설정 파일을 따르고 로컬 장비의 설정을 우선시하며, 그 뒤에 naming service를 호출한다.
 +> /etc/hosts 가 IP와 hostname으로 명시적으로 localhost를 가지고 있으므로 이를 따르는 것으로 보인다.
 +> 기존 JDK가 호출하는 gethostbyname_r 은 로컬 장비의 설정을 무시하고 즉각 naming service를 호출한다.
 +
 +==== 하나의 Domain Name에 여러 IP가 Round Robin으로 물려 있을 때 특정 IP만 응답하는 문제 ====
 +  * [[http://knight76.tistory.com/entry/java7java8-%EC%A0%84%ED%99%98-%EA%B4%80%EB%A0%A8-%EB%84%A4%ED%8A%B8%EC%9B%8C%ED%82%B9-%EC%9D%B4%EC%8A%88-getaddrinfo|김용환 블로그 :: java7->java8 전환 관련 네트워킹 이슈 (getaddrinfo)]]
 +  * [[https://bugs.openjdk.java.net/browse/JDK-7112670|[JDK-7112670] Inet4AddressImpl should use getaddrinfo/getnameinfo ( modernization/cleanup ) - Java Bug System]]
 +  * [[https://access.redhat.com/solutions/22132|Round-robin DNS broken by getaddrinfo in Red Hat Enterprise Linux - Red Hat Customer Portal]]
 +  * [[https://groups.google.com/forum/#!topic/consul-tool/AGgPjrrkw3g|getaddrinfo breaks round robin DNS - Google 그룹스]] - ''/etc/gai.conf''를 수정하여 문제 해결
 +  * RedHat Linux 4~7 에 영향을 미친다고 하는데, 실제로는 6.5~7에서는 별 문제 없다는 말도 있음. 테스트가 필요함.
 +
 +
 +==== 고부하 (High CPU) 상황에서 Socket read hang ====
 +  * [[https://bugs.openjdk.java.net/browse/JDK-8049846|[JDK-8049846] SocketInputStream.socketRead0 hangs even with soTimeout under high load - Java Bug System]]
 +
  
java/8/migration.1471395467.txt.gz · 마지막으로 수정됨: 2016/08/17 09:27 저자 kwon37xi