OneClick shows high memory utilization, we want to understand where the memory is going
search cancel

OneClick shows high memory utilization, we want to understand where the memory is going

book

Article ID: 244005

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction

We are using a standalone OneClick server on Linux with Webapp.  We see that our memory is staying constantly very high and we do not understand how the memory is being used on this server.

How can we check where the memory is going?

Environment

Release : 20.2.x, 21.2.x  Red Hat Linux

Component : OneClick with Webapp

Cause

The first process is the virtual frame buffer (/bin/sh /usr/bin/xvfb-run) that is needed for the webtomcat process to run.

This is the same in all current versions of Spectrum running webapp in Linux.

Resolution

Webapp server launches with two processes, a parent process and a child process, this is because the very first process is to setup the virtual frame buffer which is required for Linux webapp to handle the webapp GUI.

This can be seen by doing a 

 

ps -ef | grep -i webtomcat

 

spectrum    2030       1  0 06:18 ?        00:00:00 /bin/sh /usr/bin/xvfb-run /usr/Spectrum/Java/bin/java -Djava.util.logging.config.file=/usr/Spectrum/webtomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -DOneClick -server -Xmx4096M -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Djavax.net.ssl.trustStore=/usr/Spectrum/custom/keystore/cacerts -Dfile.encoding=UTF-8 -Dorg.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=true -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Djava.endorsed.dirs=/usr/Spectrum/webtomcat/lib/endorsed -classpath /usr/Spectrum/webtomcat/bin/bootstrap.jar:/usr/Spectrum/webtomcat/bin/tomcat-juli.jar -Dcatalina.base=/usr/Spectrum/webtomcat -Dcatalina.home=/usr/Spectrum/webtomcat -Djava.io.tmpdir=/usr/Spectrum/webtomcat/temp org.apache.catalina.startup.Bootstrap start

 

spectrum    2272    2030  1 06:18 ?        00:02:01 /usr/Spectrum/Java/bin/java -Djava.util.logging.config.file=/usr/Spectrum/webtomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -DOneClick -server -Xmx4096M -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Djavax.net.ssl.trustStore=/usr/Spectrum/custom/keystore/cacerts -Dfile.encoding=UTF-8 -Dorg.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=true -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Djava.endorsed.dirs=/usr/Spectrum/webtomcat/lib/endorsed -classpath /usr/Spectrum/webtomcat/bin/bootstrap.jar:/usr/Spectrum/webtomcat/bin/tomcat-juli.jar -Dcatalina.base=/usr/Spectrum/webtomcat -Dcatalina.home=/usr/Spectrum/webtomcat -Djava.io.tmpdir=/usr/Spectrum/webtomcat/temp org.apache.catalina.startup.Bootstrap start

 

In this example we are using an extra 4gb of memory for the webapp, this is by design.  Windows does not have this limitation

 

 

Additional Information

You can check what java is using for memory for each pid in Linux with this command

ps -opid,rss,vsz -p $(/sbin/pidof java)

 

Then for each pid returned we can run the other command to know for sure the processes.

 

ps -p <pid number> -o command