We migrated from Hibernate 4.3.8 to 5.4.14 and migrated from old ehcache 2 to jcache with ehcache 3 based secondary cache. we noticed application being terrible slow. A simple test of bulk reading our entities and iterating over their collections showed following: with no secondary caching - 10 sec with old ehcache provider - 13 sec with new jcache/ehcache 3 - 32 sec with Apache JCS - 28 sec Hibernate is 5.4.14, EhCache 3.8.1 my default cache config is consistent for both. in case of jcache it is
<config
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns='http://www.ehcache.org/v3'
xmlns:jsr107='http://www.ehcache.org/v3/jsr107'
xsi:schemaLocation="
http://www.ehcache.org/v3 http://www.ehcache.org/schema/ehcache-core-3.8.xsd
http://www.ehcache.org/v3/jsr107 http://www.ehcache.org/schema/ehcache-107-ext-3.8.xsd">
<service>
<jsr107:defaults default-template="defaultCache" enable-management="false" enable-statistics="false">
</jsr107:defaults>
</service>
<cache-template name="defaultCache">
<expiry>
<ttl unit="minutes">60</ttl>
</expiry>
<heap unit="entries">20000</heap>
</cache-template>
<cache alias="default-update-timestamps-region">
<expiry>
<ttl unit="minutes">600</ttl>
</expiry>
<heap unit="entries">50000</heap>
</cache>
</config>
I would appreciate any input Thank you, Alex |