[ 
https://issues.apache.org/jira/browse/SOLR-7372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shalin Shekhar Mangar updated SOLR-7372:
----------------------------------------
    Attachment: SOLR-7372.patch

Simple patch:
# LRUCache implements Accountable
# The values are used to calculate the ram usage
# Added a simple test

This makes it possible to limit the heap usage of the query result cache and 
the filter cache. This won't work for the document cache because the Document 
class isn't accountable.

TODO:
# Take the keys's ram usage into account. For example, TermsQuery can be big.
# Have a humanized format for the maxRamBytes e.g. maxRamBytes=512M should be 
possible.

> Limit LRUCache by RAM usage
> ---------------------------
>
>                 Key: SOLR-7372
>                 URL: https://issues.apache.org/jira/browse/SOLR-7372
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Shalin Shekhar Mangar
>            Assignee: Shalin Shekhar Mangar
>             Fix For: Trunk, 5.2
>
>         Attachments: SOLR-7372.patch
>
>
> Now that SOLR-7371 has made DocSet impls Accountable, we should add an option 
> to LRUCache to limit itself by RAM.
> I propose to add a 'maxRamBytes' configuration parameter which it can use to 
> evict items once the total RAM usage of the cache reaches this limit.



--
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