-
Enhancement
-
Resolution: Won't Fix
-
P4
-
None
-
8u72
-
x86_64
-
linux
FULL PRODUCT VERSION :
java version "1.8.0_72"
Java(TM) SE Runtime Environment (build 1.8.0_72-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.72-b15, mixed mode)
FULL OS VERSION :
2.6.32-642.1.1.el6.x86_64
A DESCRIPTION OF THE PROBLEM :
Problem:
Java applications that use synchronization extensively perform poorly on Linux distributions that include the Completely Fair Scheduler.
CPU usage essentially doubled when application was migrated from CentOS 5 to 6.
Cause:
The Completely Fair Scheduler (CFS) is a scheduler that was adopted into the mainline Linux kernel as of release 2.6.23. The CFS algorithm is different from previous Linux releases. It might change the performance properties of some applications. In particular, CFS implements sched_yield() differently, making it more likely that a thread that yields will be given CPU time regardless.
IBM introduced the following workaround in JVM 7.1.0 to deal with this issue:
If you observe poor performance of your Java application, invoke your Java application with the following additional argument:
-Xthr:minimizeUserCPU
Does Oracle Java HotSpot have similar features to deal with such situation?
Any other suggestions how to combat sudden CPU usage increase especially noticeable due to migration from CentOS 5 to 6?
Other references:
http://www.novell.com/linux/releasenotes/i386/SUSE-SLES/11-SP2/#id3413162
http://www-01.ibm.com/support/docview.wss?uid=swg21372909
http://www-01.ibm.com/support/docview.wss?uid=pos1R1004997
https://www.ibm.com/support/knowledgecenter/SSYKE2_7.1.0/com.ibm.java.lnx.71.doc/diag/problem_determination/linux_limitations.html
https://www.ibm.com/support/knowledgecenter/SSYKE2_7.1.0/com.ibm.java.lnx.71.doc/diag/appendixes/cmdline/Xthr.html
http://unix.stackexchange.com/questions/37225/isolating-cause-of-higher-cpu-usage-on-rhel-6-vs-rhel-5?rq=1
http://superuser.com/questions/595326/how-to-enable-sched-compat-yield
THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try
THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Did not try
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Tomcat based Java application has been migrated from CentOS 5 to CentOS 6.
EXPECTED VERSUS ACTUAL BEHAVIOR :
CPU usage was expected to be comparable, but it increased about twofold.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
Possibly using IBM JVM instead of Oracle JVM.
IBM introduced the following workaround in JVM 7.1.0:
If you observe poor performance of your Java application, invoke your Java application with the following additional argument:
-Xthr:minimizeUserCPU
Does Oracle Java HotSpot have similar features to deal with such situation?
Any other suggestions how to combat sudden CPU usage increase especially noticeable due to migration from CentOS 5 to 6?
java version "1.8.0_72"
Java(TM) SE Runtime Environment (build 1.8.0_72-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.72-b15, mixed mode)
FULL OS VERSION :
2.6.32-642.1.1.el6.x86_64
A DESCRIPTION OF THE PROBLEM :
Problem:
Java applications that use synchronization extensively perform poorly on Linux distributions that include the Completely Fair Scheduler.
CPU usage essentially doubled when application was migrated from CentOS 5 to 6.
Cause:
The Completely Fair Scheduler (CFS) is a scheduler that was adopted into the mainline Linux kernel as of release 2.6.23. The CFS algorithm is different from previous Linux releases. It might change the performance properties of some applications. In particular, CFS implements sched_yield() differently, making it more likely that a thread that yields will be given CPU time regardless.
IBM introduced the following workaround in JVM 7.1.0 to deal with this issue:
If you observe poor performance of your Java application, invoke your Java application with the following additional argument:
-Xthr:minimizeUserCPU
Does Oracle Java HotSpot have similar features to deal with such situation?
Any other suggestions how to combat sudden CPU usage increase especially noticeable due to migration from CentOS 5 to 6?
Other references:
http://www.novell.com/linux/releasenotes/i386/SUSE-SLES/11-SP2/#id3413162
http://www-01.ibm.com/support/docview.wss?uid=swg21372909
http://www-01.ibm.com/support/docview.wss?uid=pos1R1004997
https://www.ibm.com/support/knowledgecenter/SSYKE2_7.1.0/com.ibm.java.lnx.71.doc/diag/problem_determination/linux_limitations.html
https://www.ibm.com/support/knowledgecenter/SSYKE2_7.1.0/com.ibm.java.lnx.71.doc/diag/appendixes/cmdline/Xthr.html
http://unix.stackexchange.com/questions/37225/isolating-cause-of-higher-cpu-usage-on-rhel-6-vs-rhel-5?rq=1
http://superuser.com/questions/595326/how-to-enable-sched-compat-yield
THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try
THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Did not try
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Tomcat based Java application has been migrated from CentOS 5 to CentOS 6.
EXPECTED VERSUS ACTUAL BEHAVIOR :
CPU usage was expected to be comparable, but it increased about twofold.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
Possibly using IBM JVM instead of Oracle JVM.
IBM introduced the following workaround in JVM 7.1.0:
If you observe poor performance of your Java application, invoke your Java application with the following additional argument:
-Xthr:minimizeUserCPU
Does Oracle Java HotSpot have similar features to deal with such situation?
Any other suggestions how to combat sudden CPU usage increase especially noticeable due to migration from CentOS 5 to 6?