Performance Tuning Hybris
Performance Tuning Hybris
Performance Tuning Hybris
Albin Issac
www.albinsblog.com
This document explains the approach to tune the Hybris platform.
Remote JMX monitoring will help us to monitor the server resources (e.g. memory usage and
CPU usage) through JMX client such as VisualVM.
-Dcom.sun.management.jmxremote.port=50055 -
Dcom.sun.management.jmxremote.authenticate=false -
Dcom.sun.management.jmxremote.ssl=false -
Memory usage also can be monitored from admin console
Monitoring Memory
JVM Tuning:
The default JVM parameters are not optimal for running large applications. So the parameters
(e.g. memory and GC) should be tuned for optimal performance of the application.
Apply the required load to the system – Apache JMeter can be used to load the request
to the system.
Monitor the system resources like CPU, Memory and threads using VisualVM while load
is applied to the system
Change the memory parameters and GC parameters based on the above test result.
If you provide too little memory to an application it will run out of memory. The JVM will not be
able to free up memory space at the rate that your application needs it. In this scenario JVM
will throw an OutOfMemoryError and shut down completely
The above three steps should be repeated to achieve the optimum system performance by
applying different values for the parameters.
Thread Tuning:
tomcat.acceptcount=150
tomcat.maxthreads=300
Old
<Connector port="${tomcat.http.port}"
maxHttpHeaderSize="8192"
maxThreads="${tomcat.maxthreads}"
protocol="org.apache.coyote.http11.Http11Protocol"
executor="hybrisExecutor"
enableLookups="false"
acceptCount="100"
connectionTimeout="20000"
URIEncoding="UTF-8"
disableUploadTimeout="true" />
New
<Connector port="${tomcat.http.port}"
maxHttpHeaderSize="8192"
maxThreads="${tomcat.maxthreads}"
protocol="org.apache.coyote.http11.Http11Protocol"
executor="hybrisExecutor"
enableLookups="false"
acceptCount="150"
connectionTimeout="20000"
URIEncoding="UTF-8"
disableUploadTimeout="true" />
Improve Caching:
Thread Dumps:
Thread Dump is a snapshot taken at a given time which provides with a complete listing of all
created Java Threads. The thread dump can be analyzed to determine the bottleneck or
blocking threads.
Different tools can be used to analyze the thread dumps e.g. Samurai and IBM Thread and
Monitor Dump Analyzer for Java.
JDBC Logging:
Sometimes the application will be very slow due to slow running queries. Analyzing the slower
running queries using JDBC logging and create the indexes wherever required can drastically
improve performance.
Click on Start logging and click on Stop logging after particular time.