[ 
https://issues.apache.org/jira/browse/SOLR-7355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14484300#comment-14484300
 ] 

Ben Manes commented on SOLR-7355:
---------------------------------

This ticket is not an attempt to advocate a competing project, but rather is a 
notification that ConcurrentLinkedHashMap has reached its end-of-life and will 
only receive maintenance updates. Similarly Guava's cache is in maintenance 
mode, performance improvements are not accepted due to a lack of owner, and 
Guava stay JDK6 due to Android. As the author or co-author of all three caching 
libraries, this is the upgrade path that I recommend. Solr can instead choose 
to stay as is or migrate to an alternative library.

Does Solr have performance tests? The before mentioned benchmarks show that 
Caffeine has equivalent performance to CLHM v1.4.2. However, Solr uses the 
older v1.2 dependency which typically performs reasonably well under 
application load but much worse in a micro-benchmark. That's due to the 
original focus on avoiding lock contention (Java 5 synchronizers were slow) and 
later resolving GC pressure under synthetic stress tests. The evolutionary 
improvements to Caffeine's algorithms mostly reduce memory usage and has only a 
subtle impact on the performance profile.

Caffeine executes over 1.5 million unit tests and the changes pass Solr's test 
suite. Any latent bugs will be addressed upon discovery.

> Java 8: ConcurrentLinkedHashMap -> Caffeine
> -------------------------------------------
>
>                 Key: SOLR-7355
>                 URL: https://issues.apache.org/jira/browse/SOLR-7355
>             Project: Solr
>          Issue Type: Task
>            Reporter: Ben Manes
>            Priority: Minor
>         Attachments: SOLR-7355.patch
>
>
> When Solr transitions to requiring Java 8, please upgrade to Caffeine. The 
> performance should be relatively the same. The per-instance memory usage 
> should be smaller and Solr may decide to opt-in to use some of the additional 
> features. The only drawback is that the jar size is larger due to code 
> generation, though that may be trimmed over time and usually is not a concern 
> for server-side applications.
> ConcurrentLinkedHashMap changes will continue to be minimal, even more so 
> now, and driven by requests from Java 6 users unable to upgrade. Caffeine is 
> ideally the upgrade path for Guava cache users too, which due to Android 
> cannot be significantly modified.
> Caffeine: https://github.com/ben-manes/caffeine
> Benchmarks: https://github.com/ben-manes/caffeine/wiki/Benchmarks
> ConcurrentLinkedHashMap: https://code.google.com/p/concurrentlinkedhashmap



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to