lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrien Grand (JIRA)" <>
Subject [jira] [Updated] (SOLR-3486) The memory size of Solr caches should be configurable
Date Fri, 25 May 2012 10:06:23 GMT


Adrien Grand updated SOLR-3486:

    Attachment: SOLR-3486.patch

Hi Shawn,

I modified the patch in order to make it easier to add this functionality to other cache implementations.
All you need to do for SOLR-3393 to support maximum memory size is to split your implementation
into a LFU map (a regular map, with no evictions) which iterates (entrySet().iterator()) in
frequency order and a LFU cache (that will probably extend or wrap this LFU map). Then to
have a LFU cache with a fixed max mem size, just wrap your LFU map into a new SizableCache
> The memory size of Solr caches should be configurable
> -----------------------------------------------------
>                 Key: SOLR-3486
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>            Reporter: Adrien Grand
>            Priority: Minor
>         Attachments: SOLR-3486.patch, SOLR-3486.patch
> It is currently possible to configure the sizes of Solr caches based on the number of
entries of the cache. The problem is that the memory size of cached values may vary a lot
over time (depending on IndexReader.maxDoc and the queries that are run) although the JVM
heap size does not.
> Having a configurable max size in bytes would also help optimize cache utilization, making
it possible to store more values provided that they have a small memory footprint.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message