RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2011102 - JRE, Tomcat, pki-ca high memory use in RHEL-8.4 IPA, Java heap tuning
Summary: JRE, Tomcat, pki-ca high memory use in RHEL-8.4 IPA, Java heap tuning
Keywords:
Status: CLOSED DUPLICATE of bug 2042900
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pki-core
Version: 8.4
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: 8.8
Assignee: RHCS Maintainers
QA Contact: PKI QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-10-06 00:38 UTC by Marc Sauton
Modified: 2023-09-15 01:36 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-09-13 11:50:07 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-98929 0 None None None 2021-10-06 00:40:14 UTC
Red Hat Issue Tracker RHELPLAN-98930 0 None None None 2021-10-06 00:40:17 UTC
Red Hat Knowledge Base (Solution) 6956876 0 None None None 2022-05-06 21:50:34 UTC

Description Marc Sauton 2021-10-06 00:38:54 UTC
Description of problem:

Memory growth over time was observed for the RHEL IPA PKI Java process, from ~10% to ~27% in ~18 hours, for a small IPA deployment.

The JVM heap size is not being set anymore in /etc/pki/pki-tomcat/tomcat.conf

We have:
JAVA_OPTS="-Dcom.redhat.fips=false"

The JVM defaults to 1/4th of the system's RAM, 2GB in this case for a 8GB RAM system, and appeared to be too small:
Java metaspace defaults to 1GB,  JVM process size is 1,5GB+, not suspiciously large.
It's possible the heap is so large that no gc activity is happening, and that's why it gets large.

and may need a tuning with
JAVA_OPTS="-Dcom.redhat.fips=false -Xms2g -Xmx2g"


should the JAVA_OPTS options Xms and Xmx be specified?
the challenge is this depends on the system RAM configuration.

Not sure why this was a problem on this system, and not a more common issue, it this is really a configuration change needed.


Version-Release number of selected component (if applicable):

RHEL-8.4 IPA
Java-1.8.0-openjdk-1.8.0.302.b08-0.el8_4.x86_64
ipa-server-4.9.2-4.module+el8.4.0+11156+94d209c1.x86_64
pki-ca-10.10.5-3.module+el8.4.0+11039+635979e4.noarch
tomcatjss-7.6.1-1.module+el8.4.0+8778+d07929ff.noarch
jss-4.8.1-2.module+el8.4.0+10451+3e5b5448.x86_64
redhat-release-eula-8.4-0.6.el8.x86_64

8GB RAM, VMWare virt guest
2 replicas
"small" IPA LDAP DBs 


How reproducible:
N/A

Steps to Reproduce:
1. N/A
2.
3.

Actual results:

USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
dirsrv    511292  0.3  2.6 1429520 212148 ?      Ssl  Aug13  19:12 /usr/sbin/ns-slapd -D /etc/dirsrv/slapd-edited -i /run/dirsrv/slapd-edited.pid
pkiuser   511747  0.2 20.3 5225532 1620396 ?     Ssl  Aug13  12:04 /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Dcom.redhat.fips=false -classpath /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar:/usr/share/java/ant.jar:/usr/share/java/ant-launcher.jar:/usr/lib/jvm/java/lib/tools.jar -Dcatalina.base=/var/lib/pki/pki-tomcat -Dcatalina.home=/usr/share/tomcat -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/lib/pki/pki-tomcat/temp -Djava.util.logging.config.file=/var/lib/pki/pki-tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.security.manager -Djava.security.policy==/var/lib/pki/pki-tomcat/conf/catalina.policy org.apache.catalina.startup.Bootstrap start


Expected results:


Additional info:

$ cut -c1-150 ps.out |head
ps.31080054:USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND

ps.31080054:pkiuser   185398  0.2 10.0 4637832 799044 ?      Ssl  Aug30   1:39 /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Dcom.redhat.fips=false -class
ps.31080154:pkiuser   185398  0.1 10.0 4637832 799044 ?      Ssl  Aug30   1:41 /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Dcom.redhat.fips=false -class
ps.31080254:pkiuser   185398  0.1 10.0 4637832 799044 ?      Ssl  Aug30   1:43 /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Dcom.redhat.fips=false -class
ps.31080354:pkiuser   185398  0.1 10.0 4637832 799108 ?      Ssl  Aug30   1:45 /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Dcom.redhat.fips=false -class
ps.31080454:pkiuser   185398  0.1 10.0 4637832 799108 ?      Ssl  Aug30   1:47 /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Dcom.redhat.fips=false -class
ps.31080554:pkiuser   185398  0.1 10.0 4637832 799084 ?      Ssl  Aug30   1:48 /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Dcom.redhat.fips=false -class
ps.31080654:pkiuser   185398  0.1 10.0 4637832 799104 ?      Ssl  Aug30   1:50 /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Dcom.redhat.fips=false -class
ps.31080754:pkiuser   185398  0.1 10.0 4637832 799112 ?      Ssl  Aug30   1:52 /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Dcom.redhat.fips=false -class
$ cut -c1-150 ps.out |tail
ps.06090454:pkiuser   185398  0.1 26.7 5344128 2130924 ?     Ssl  Aug30  17:13 /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Dcom.redhat.fips=false -class
ps.06090554:pkiuser   185398  0.1 23.0 5344128 1832540 ?     Ssl  Aug30  17:15 /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Dcom.redhat.fips=false -class
ps.06090654:pkiuser   185398  0.1 23.0 5344128 1832876 ?     Ssl  Aug30  17:17 /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Dcom.redhat.fips=false -class
ps.06090754:pkiuser   185398  0.1 23.0 5344128 1833764 ?     Ssl  Aug30  17:19 /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Dcom.redhat.fips=false -class
ps.06090854:pkiuser   185398  0.1 22.7 5344128 1812972 ?     Ssl  Aug30  17:21 /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Dcom.redhat.fips=false -class
ps.06090954:pkiuser   185398  0.1 22.8 5344128 1818232 ?     Ssl  Aug30  17:23 /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Dcom.redhat.fips=false -class
ps.06091054:pkiuser   185398  0.1 22.8 5344128 1818460 ?     Ssl  Aug30  17:24 /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Dcom.redhat.fips=false -class
ps.06091154:pkiuser   185398  0.1 24.4 5347456 1942544 ?     Ssl  Aug30  18:34 /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Dcom.redhat.fips=false -class
ps.06091254:pkiuser   185398  0.1 24.4 5347456 1944048 ?     Ssl  Aug30  18:36 /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Dcom.redhat.fips=false -class
ps.06091354:pkiuser   185398  0.1 26.9 5679884 2146096 ?     Ssl  Aug30  19:33 /usr/lib/jvm/java-1.8.0-openjdk/bin/java -Dcom.redhat.fips=false -class
// mem usage doubled.

Comment 1 cdorney 2021-10-08 18:52:39 UTC
Is possible to produce a reproducer on a VM somehow and what happens if you try to reproduce without IPA?

Comment 17 Petr Čech 2022-09-13 11:50:07 UTC

*** This bug has been marked as a duplicate of bug 2042900 ***

Comment 18 Red Hat Bugzilla 2023-09-15 01:36:30 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days


Note You need to log in before you can comment on or make changes to this bug.