Bug 1400462

Summary: Freeipa on ARM - OpenJDK vs. Oracle JDK - OpenJDK slow
Product: [Fedora] Fedora Reporter: W. de Heiden <wdh>
Component: pki-coreAssignee: Matthew Harmsen <mharmsen>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 25CC: abokovoy, alee, baldur, edewata, ipa-maint, jcholast, jhrozek, kwright, lslebodn, mharmsen, mkosek, pvoborni, rcritten, ssorce, wdh
Target Milestone: ---   
Target Release: ---   
Hardware: armv7hl   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-15 16:08:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description W. de Heiden 2016-12-01 10:00:07 UTC
Description of problem:

Starting FreeIPA (4.4.2) using the default installation (running OpenJDK) starting FreeIPA takes a painfull 15 minutes (afterward, it all just works fine):

[root@rpi2 sysconfig]# time ipactl start
Starting Directory Service
Starting krb5kdc Service
Starting kadmin Service
Starting named Service
Starting ipa_memcached Service
Starting httpd Service
Starting ipa-custodia Service
Starting ntpd Service
Starting pki-tomcatd Service
Starting ipa-otpd Service
Starting ipa-dnskeysyncd Service
ipa: INFO: The ipactl command was successful

real    15m40.638s
user    0m33.095s
sys    0m1.910s

Using Oracle Java (taken from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) give a huge performance improvement:

Now, after installing Oracle Java and changing JAVA_HOME in /etc/sysconfig/pki-tomcat to:

#JAVA_HOME="/usr/lib/jvm/jre-1.8.0-openjdk"
JAVA_HOME="/opt/jdk1.8.0_111/jre"

[root@rpi2 sysconfig]# time ipactl start
Starting Directory Service
Starting krb5kdc Service
Starting kadmin Service
Starting named Service
Starting ipa_memcached Service
Starting httpd Service
Starting ipa-custodia Service
Starting ntpd Service
Starting pki-tomcatd Service
Starting ipa-otpd Service
Starting ipa-dnskeysyncd Service
ipa: INFO: The ipactl command was successful

real	2m14.823s
user	0m33.400s
sys	0m1.730s


Version-Release number of selected component (if applicable):
Fedora ARM 25
java-1.8.0-openjdk-headless-1.8.0.111-3.b16.fc25.armv7hl
FreeIPA 4.4.2


How reproducible:
Changing JAVA_HOME in /etc/sysconfig/pki-tomcat to:

#JAVA_HOME="/usr/lib/jvm/jre-1.8.0-openjdk"
JAVA_HOME="/opt/jdk1.8.0_111/jre"


Steps to Reproduce:
1. stop IPA (ipactl stop)
2. change JAVA_HOME
3. start IPA and measure time

Actual results:
Using Oracle JDK IPA (pki-tomcat that is) will start appr. 6 times faster

Expected results:
More or less same performance using OpenJDK


Additional info:
Test done on Rapsberry Pi 3b

Comment 1 Petr Vobornik 2016-12-01 18:24:01 UTC
In the end, this bug might be passed to openjdk-1.8 component, but for now passing to pki-core given that it is the component of FreeIPA which uses Java and therefore might have some ideas/opinions/be interested.

Comment 2 Matthew Harmsen 2016-12-16 00:05:05 UTC
Upstream ticket:
https://fedorahosted.org/pki/ticket/2568

Comment 3 Matthew Harmsen 2017-11-15 16:08:49 UTC
ftweedal wrote:

Closing due to inactivity. Patches still welcome, please reopen if you have some patches you would like to share.

Thanks!

Comment 4 Dietmar Kling 2017-12-24 22:51:11 UTC
Want to update that this bug is still existing in fedora 27 on arm (both arm32 and arm64).  
The openjdk eats up cpu time to 95% all the time, while the oracle jdk after a 30 Seconds peak, returns to 20% and then to 0.6% cpu utilization in top.

Comment 5 Dietmar Kling 2017-12-24 22:51:41 UTC
Want to update that this bug is still existing in fedora 27 on arm (both arm32 and arm64).  
The openjdk eats up cpu time to 95% all the time, while the oracle jdk after a 30 Seconds peak, returns to 20% and then to 0.6% cpu utilization in top.