[hibernate-issues] [JIRA] (HHH-13979) Performance with JCache/EhCache v3 is three times slower than with old ehcache

Alex Roytman (JIRA) jira at hibernate.atlassian.net
Thu Apr 23 19:11:55 EDT 2020


Alex Roytman ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Aaf412e6c-7e3f-4cbf-8528-13cb0b843224 ) *created* an issue

Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMjVhOWVjNDA4ZWZhNGQ3MDhkY2EyNWEyZmJlYWNmN2EiLCJwIjoiaiJ9 ) / Bug ( https://hibernate.atlassian.net/browse/HHH-13979?atlOrigin=eyJpIjoiMjVhOWVjNDA4ZWZhNGQ3MDhkY2EyNWEyZmJlYWNmN2EiLCJwIjoiaiJ9 ) HHH-13979 ( https://hibernate.atlassian.net/browse/HHH-13979?atlOrigin=eyJpIjoiMjVhOWVjNDA4ZWZhNGQ3MDhkY2EyNWEyZmJlYWNmN2EiLCJwIjoiaiJ9 ) Performance with JCache/EhCache v3 is three times slower than with old ehcache ( https://hibernate.atlassian.net/browse/HHH-13979?atlOrigin=eyJpIjoiMjVhOWVjNDA4ZWZhNGQ3MDhkY2EyNWEyZmJlYWNmN2EiLCJwIjoiaiJ9 )

Issue Type: Bug Affects Versions: 5.4.14 Assignee: Unassigned Components: hibernate-ehcache Created: 23/Apr/2020 16:11 PM Environment: Hibernate is 5.4.14
EhCache 3.8.1
JDK 8 Priority: Major Reporter: Alex Roytman ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Aaf412e6c-7e3f-4cbf-8528-13cb0b843224 )

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

( https://hibernate.atlassian.net/browse/HHH-13979#add-comment?atlOrigin=eyJpIjoiMjVhOWVjNDA4ZWZhNGQ3MDhkY2EyNWEyZmJlYWNmN2EiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-13979#add-comment?atlOrigin=eyJpIjoiMjVhOWVjNDA4ZWZhNGQ3MDhkY2EyNWEyZmJlYWNmN2EiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100125- sha1:63ccdc5 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200423/4822f3e3/attachment.html 


More information about the hibernate-issues mailing list