I’ve made some findings that helped me reduce hybris startup time by 40–50%. This article provides several recommendations on how to make hybris/Tomcat start faster.
All recommendations below are only for development environments because most of them have side effects that are important for production systems.
Cron Jobs: Turn Them Off
To prevent cron jobs from starting automatically on server startup, add:
cronjob.timertask.loadonstartup=falseto:
local.propertiesYou can also update the triggers’ maxAcceptableDelay:
UPDATE Trigger[batchmode=true];itemtype(code)[unique=true];maxAcceptableDelay
;Trigger;1800Tenants: Remove Unused Ones
Remove unused tenants in local.properties (such as the one for JUnit) if they are not needed:
#default: installed.tenants=junit,foo,t1,t2installed.tenants=Heavy project: 2,790 custom Java classes on top of Hybris Accelerator, DB: local MySQL.
Load time before changes: 857 sec
Load time after changes: 679 sec (-20%)
See my laptop configuration below.
Tomcat: Load Host and Engine Containers in Parallel
…The number of threads this Engine will use to start child Host elements in parallel. The special value of «0» will result in the value of Runtime.getRuntime().availableProcessors() being used. Negative values will result in Runtime.getRuntime().availableProcessors() + value being used unless this is less than 1 in which case 1 thread will be used. If not specified, the default value of 1 will be used. // http://tomcat.apache.org/tomcat-7.0-doc/config/engine.html
However, take into account that hybris is not thread-safe during startup, and many parallel processes may lead to unexpected behavior. Even if it works on a local machine (e.g., QuadCore), it might not work in a production environment (e.g., 12 or 24 cores). So delete this configuration if you face any problems. Also take into account that hybris will consume more CPU with this configuration.
config/tomcat/conf/server.xml:

Heavy project: 2,790 custom Java classes on top of Hybris Accelerator, DB: local MySQL.
Load time before changes: 857 sec
Load time after changes: 644 sec (-24%)
See my laptop configuration below.
Excluding Some JARs from Scanning
First, you can remove the following JARs from:
bin/platform/tomcat/libbecause WebSockets do not seem to be used in hybris:
tomcat7-websocket.jarwebsocket-api.jar
The second thing is to remove Servlet 3 scanning. For that, you need to change the following key in:
catalina.propertiesBy default, it is empty in hybris:
org.apache.catalina.startup.ContextConfig.jarsToSkip=*.jarThe last change in this section is turning off TLD scanning for all but a few JARs where we definitely know TLDs exist. In the listed JARs, there are no *.tld files, so they can be skipped by Tomcat’s TLDConfig:
org.apache.catalina.startup.TldConfig.jarsToSkip=re11-1.22.jar,\
acceleratorcmshmchmc.jar,\
acceleratorserviceshmchmc.jar,\
admincockpitserver.jar,\
advancedsavedqueryserver.jar,\
amwaycontentsolrsearchaddonhmc.jar,\
annotations-2.0.0.jar,\
annotations-api.jar,\
ant-commons-net-1.6.5.jar,\
aopalliance-1.0.jar,\
asm-1.0.2.jar,\
asm-3.3.1.jar,\
aspectjweaver-1.8.5.jar,\
assertj-core-3.5.2.jar,\
atlantic-1.1.2.jar,\
avalon-framework-4.2.0.jar,\
backoffice-core-1.0.2.1.jar,\
backoffice-core-6.2.0.0-RC7-sources.jar,\
backoffice-core-6.2.0.0-RC7.jar,\
backoffice-module-6.2.0.0-RC9-sources.jar,\
backoffice-widgets-1.0.2.1.jar,\
backoffice-widgets-6.2.0.0-RC7-sources.jar,\
backoffice-widgets-6.2.0.0-RC7.jar,\
backofficeserver.jar,\
barcode4j-light-2.0.jar,\
basecommercehmchmc.jar,\
batik-all-1.7.jar,\
bcprov-jdk15-1.46.jar,\
bmecathmchmc.jar,\
bmecathmcserver.jar,\
bmecatserver.jar,\
bsh-2.0b5.jar,\
btc-ascii-table-1.0.jar,\
canvas-1.0-hybris-patched.jar,\
catalina-ant.jar,\
catalina-ha.jar,\
catalina-jmx-remote.jar,\
catalina-tribes.jar,\
catalina.jar,\
catalogserver.jar,\
cglib-nodep-2.2.2.jar,\
ckez-4.4.6.1.jar,\
classificationsystemshmchmc.jar,\
classificationsystemsserver.jar,\
cloning-1.9.0.jar,\
cms2hmchmc.jar,\
cms2hmcserver.jar,\
cms2libserver.jar,\
cms2server.jar,\
cmscockpitserver.jar,\
cmswebservicesserver.jar,\
cockpit-data-integration-6.2.0.0-RC7-sources.jar,\
cockpit-data-integration-6.2.0.0-RC7.jar,\
cockpit-demo-widgets-1.0.2.1.jar,\
cockpit-demo-widgets-6.2.0.0-RC7-sources.jar,\
cockpit-demo-widgets-6.2.0.0-RC7.jar,\
cockpit-module-aggregator-1.0.2.1.jar,\
cockpit-module-aggregator-6.2.0.0-RC7-sources.jar,\
cockpit-module-aggregator-6.2.0.0-RC7.jar,\
cockpit-standard-editors-6.2.0.0-RC7-sources.jar,\
cockpit-standard-editors-6.2.0.0-RC7.jar,\
cockpitadmin-1.0.2.1.jar,\
cockpitadmin-6.2.0.0-RC7-sources.jar,\
cockpitadmin-6.2.0.0-RC7.jar,\
cockpitcore-1.0.2.1.jar,\
cockpitcore-6.2.0.0-RC7-sources.jar,\
cockpitcore-6.2.0.0-RC7.jar,\
cockpitframework-1.0.2.1.jar,\
cockpitframework-6.2.0.0-RC7-sources.jar,\
cockpitframework-6.2.0.0-RC7.jar,\
cockpitserver.jar,\
cockpittesting-1.0.2.1.jar,\
cockpittesting-6.2.0.0-RC7-sources.jar,\
cockpittesting-6.2.0.0-RC7.jar,\
cockpitwidgets-1.0.2.1.jar,\
cockpitwidgets-6.2.0.0-RC7-sources.jar,\
cockpitwidgets-6.2.0.0-RC7.jar,\
com.sap.security.core.server.csi-1.00.8.jar,\
commentsserver.jar,\
commercesearchhmchmc.jar,\
commerceserviceshmchmc.jar,\
commons-beanutils-1.9.2.jar,\
commons-codec-1.10.jar,\
commons-collections-3.2.2.jar,\
commons-collections4-4.1.jar,\
commons-configuration-1.10.jar,\
commons-dbcp-1.4.jar,\
commons-digester-2.1.jar,\
commons-discovery-0.5.jar,\
commons-el-1.0.jar,\
commons-email-1.2.jar,\
commons-fileupload-1.3.1.jar,\
commons-httpclient-3.1.jar,\
commons-io-2.4.jar,\
commons-jexl-1.1.jar,\
commons-lang-2.6.jar,\
commons-lang3-3.1.jar,\
commons-lang3-3.4.jar,\
commons-logging-1.2.jar,\
commons-pool-1.6.jar,\
commons-pool2-2.4.2.jar,\
commons-validator-1.4.1.jar,\
commonsserver.jar,\
concurrentlinkedhashmap-lru-1.4.jar,\
coreserver.jar,\
cscockpitserver.jar,\
customerreviewhmchmc.jar,\
ddlutils-1.0.jar,\
deliveryzoneserver.jar,\
easymock-3.1.jar,\
easymockclassextension-3.1.jar,\
ecj-4.4.jar,\
ehcache-2.9.0.jar,\
el-api.jar,\
europe1server.jar,\
fastutil-6.5.6.jar,\
fckez-2.6.1_2-hybris-patched.jar,\
fest-assert-1.4.jar,\
fest-util-1.1.6.jar,\
fop-1.0.jar,\
gmapsz-3.0.0.jar,\
google-guava-libphonenumber-svn-rev10.jar,\
groovy-all-2.4.5.jar,\
guava-18.0.jar,\
hacserver.jar,\
hamcrest-all-1.3.jar,\
hibernate-validator-4.3.2.Final.jar,\
hk2-2.4.0-b31.jar,\
hk2-api-2.4.0-b31.jar,\
hk2-locator-2.4.0-b31.jar,\
hk2-utils-2.4.0-b31.jar,\
hmcserver.jar,\
httpunit-1.7.jar,\
hybris-encryption-1.1.jar,\
hybris-simple-statistics-1.0.1.jar,\
hybriskey-1.0.jar,\
impexserver.jar,\
importcockpithmchmc.jar,\
importcockpithmcserver.jar,\
importcockpitserver.jar,\
instoreserver.jar,\
itext-2.1.7.jar,\
jackson-annotations-2.6.4.jar,\
jackson-core-2.6.4.jar,\
jackson-core-asl-1.9.13.jar,\
jackson-databind-2.6.4.jar,\
jackson-mapper-asl-1.9.13.jar,\
jai-codec-1.1.3.jar,\
jai_core-1.1.3.jar,\
jasper-el.jar,\
jasper.jar,\
jasperreports-4.0.2.jar,\
jasperreports-fonts-4.0.2.jar,\
javassist-3.19.0-GA.jar,\
javax.inject-2.4.0-b31.jar,\
javax.ws.rs-api-2.0.1.jar,\
javolution-5.5.1.jar,\
jaxb-impl-2.2.4-1.jar,\
jaxen-1.1.3.jar,\
jboss-logging-3.2.1.Final.jar,\
jcip-annotations-1.0.jar,\
jcl-over-slf4j-1.7.13.jar,\
jcommon-1.0.16.jar,\
jersey-apache-connector-2.22.1.jar,\
jersey-client-2.22.1.jar,\
jersey-common-2.22.1.jar,\
jersey-entity-filtering-2.22.1.jar,\
jersey-guava-2.22.1.jar,\
jersey-media-json-jackson-2.22.1.jar,\
jersey-media-multipart-2.22.2.jar,\
jersey-server-2.22.1.jar,\
jersey-spring3-2.22.1.jar,\
jersey-test-framework-core-2.22.1.jar,\
jfreechart-1.0.13.jar,\
jgraph-5.8.3.1-hybris-patched.jar,\
jgrapht-jdk1.6-0.8.2.jar,\
jgraphx-1.10.2.1.jar,\
jgroups-3.4.1.Final.jar,\
joda-time-2.9.1.jar,\
json-path-2.0.0.jar,\
json-smart-2.1.0.jar,\
jsp-api.jar,\
jsr305-2.0.0.jar,\
jstl-1.1.0.jar,\
jstl-api-1.2.jar,\
junit-4.12.jar,\
libphonenumber-2.3.jar,\
likey-no-iaik-1.0.3.jar,\
log4j-1.2.17.jar,\
log4j-api-2.4.1.jar,\
log4j-core-2.4.1.jar,\
log4j-slf4j-impl-2.4.1.jar,\
lucenesearchhmchmc.jar,\
mail-1.4.4.jar,\
mccserver.jar,\
mediawebserver.jar,\
metrics-core-3.1.2.jar,\
mime-util-2.1.3.jar,\
mimepull-1.6.jar,\
mobileoptionalshmchmc.jar,\
mobileoptionalshmcserver.jar,\
mobileoptionalsserver.jar,\
mobileserviceshmchmc.jar,\
mobileserviceshmcserver.jar,\
mobileservicesserver.jar,\
mockito-core-1.9.5.jar,\
models.jar,\
oauth2server.jar,\
objenesis-1.4.jar,\
ondemandcommonhmchmc.jar,\
oro-2.0.8.jar,\
paymentstandardserver.jar,\
platformhmchmc.jar,\
pmd-5.0.5.jar,\
poi-3.7.jar,\
previewwebservicesserver.jar,\
processingserver.jar,\
productcockpitserver.jar,\
promotionshmchmc.jar,\
protobuf-lite-libphonenumber-rev10.jar,\
quartz-2.1.2.jar,\
reflections-0.9.9-RC2.jar,\
reportcockpitserver.jar,\
rxjava-1.1.0.jar,\
sac-1.3.jar,\
scimark-2.0.jar,\
scriptingserver.jar,\
serializer-2.7.2.jar,\
servlet-api.jar,\
silvertail-6.5.1.1.jar,\
sitemesh-3.0-alpha-2.jar,\
slf4j-api-1.7.13.jar,\
smppapi-0.3.9.jar,\
snakeyaml-1.4.jar,\
solrfacetsearchhmchmc.jar,\
spring-aop-4.2.7.RELEASE.jar,\
spring-aspects-4.2.7.RELEASE.jar,\
spring-beans-4.2.7.RELEASE.jar,\
spring-context-4.2.7.RELEASE.jar,\
spring-context-support-4.2.7.RELEASE.jar,\
spring-core-4.2.7.RELEASE.jar,\
spring-expression-4.2.7.RELEASE.jar,\
spring-hateoas-0.19.0.RELEASE.jar,\
spring-instrument-4.2.7.RELEASE.jar,\
spring-instrument-tomcat-4.2.7.RELEASE.jar,\
spring-integration-core-4.2.8.RELEASE.jar,\
spring-jdbc-4.2.7.RELEASE.jar,\
spring-jms-4.2.7.RELEASE.jar,\
spring-messaging-4.2.7.RELEASE.jar,\
spring-mobile-device-1.0.1.RELEASE.jar,\
spring-orm-4.2.7.RELEASE.jar,\
spring-oxm-4.2.7.RELEASE.jar,\
spring-security-config-4.0.4.RELEASE.jar,\
spring-security-core-4.0.4.RELEASE.jar,\
spring-security-oauth2-2.0.9.RELEASE.jar,\
spring-security-web-4.0.4.RELEASE.jar,\
spring-test-4.2.7.RELEASE.jar,\
spring-tx-4.2.7.RELEASE.jar,\
spring-web-4.2.7.RELEASE.jar,\
spring-xml-2.2.0.RELEASE.jar,\
standard-editors-1.0.2.jar,\
ticketsystemhmchmc.jar,\
tomcat-api.jar,\
tomcat-coyote.jar,\
tomcat-dbcp.jar,\
tomcat-i18n-es.jar,\
tomcat-i18n-fr.jar,\
tomcat-i18n-ja.jar,\
tomcat-jdbc.jar,\
tomcat-juli-adapters.jar,\
tomcat-util.jar,\
tomcat7-websocket.jar,\
validation-api-1.0.0.GA.jar,\
validationserver.jar,\
velocity-1.7.jar,\
voucherhmchmc.jar,\
webfragmentCore_XSSFilter.jar,\
webfragmentCore_backofficeContextClassloaderFilter.jar,\
webfragmentCore_backofficeMobileFilter.jar,\
webfragmentCore_backofficefilterchain.jar,\
webfragmentCore_requestContextFilter.jar,\
webfragmentCore_springSecurityFilterChain.jar,\
websocket-api.jar,\
workflowserver.jar,\
wrapper.jar,\
wss4j-1.6.19.jar,\
xalan-2.7.2.jar,\
xml-apis-1.3.04.jar,\
xml-apis-ext-1.3.04.jar,\
xmlenc-0.52.jar,\
xmlgraphics-commons-1.4.jar,\
xmlsec-1.4.6.jar,\
xstream-1.4.9.jar,\
ybootstrap.jar,\
ytomcat.jar,\
zcommon-3.6.4.jar,\
zcommon-6.5.1.1.jar,\
zcommon-8.0.2.1.jar,\
zcommons-el-1.0.2.jar,\
zcommons-el-1.1.0.jar,\
zel-6.5.1.1.jar,\
zel-8.0.2.1.jar,\
zhtml-3.6.4.jar,\
zhtml-6.5.1.1.jar,\
zhtml-8.0.2.1.jar,\
zkbind-6.5.1.1.jar,\
zkbind-8.0.2.1.jar,\
zkcharts-2.1.0.jar,\
zkex-3.6.4.jar,\
zkex-6.5.1.1.jar,\
zkex-8.0.2.1.jar,\
zkmax-3.6.4.jar,\
zkmax-6.5.1.1.jar,\
zkmax-8.0.2.1.jar,\
zkplus-3.6.4.jar,\
zkplus-6.5.1.1.jar,\
zkplus-8.0.2.1.jar,\
zkspring-1.1.0.jar,\
zkspring-core-3.0.jar,\
zkspring-core-3.2.0.jar,\
zml-3.6.4.jar,\
zml-6.5.1.1.jar,\
zul-6.5.1.1.jar,\
zul-8.0.2.1.jar,\
zuti-8.0.2.1.jar,\
zxing-core-1.3.jar,\
zxing-javase-1.3.jarSmall project: ~300 custom Java classes on top of Hybris Accelerator, DB: HSQLDB.
All changes described above had already been applied to this installation.
Load time before changes: 507 sec
Load time after changes: 428 sec (-15%)
See my laptop configuration below.
If You Apply All These Changes...
With all these tweaks in place, except the last one related to skipJars, I got the following results:
Heavy project: 2,790 custom Java classes on top of Hybris Accelerator, DB: local MySQL.
Load time before changes: 857 sec
Load time after changes: 505 sec (-41%)
See my laptop configuration below.
I guess the skipJars-related changes should speed up the server a bit more, but the “heavy project” configuration I played around with before is no longer available for tests. Anyway, another configuration shows that these changes work well.
Configuration
Laptop: Dell Latitude E5470
Processor: Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz, 2701 MHz, 4 Core(s), 8 Logical Processor(s)
Memory: 16 GB
HDD: SSD SK hynix SC308 256 GB 2.5″. MLC.
- Read: 530 MB/s. Up to 95,000 IOPS.
- Write: 380 MB/s. 85,000 IOPS.
NTFS.
Operating system: Windows 10 Enterprise.
I also recommend this article on the Tomcat Wiki, as well as the Tomcat system properties reference, to understand these changes more deeply.