[jira] [Commented] (SOLR-11204) Expose a total size stat for the query result and filter cache

2017-08-09 Thread Shalin Shekhar Mangar (JIRA)

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

Shalin Shekhar Mangar commented on SOLR-11204:
--

bq. Should {{ConcurrentLRUCache#ramBytesUsed}} synchronize on the map variable 
like {[LRUCache#ramBytesUsed}} ?

It is not necessary. The {{ramBytes}} in ConcurrentLRUCache is an AtomicLong 
but the one in LRUCache is not.

bq. LRUCache and ConcurrentLRUCache only tracks ramBytesUsed when maxRamMB is 
enabled...

The algorithm used for eviction in ConcurrentLRUCache when maxRamMB is 
specified is more inefficient (always makes 3 passes vs usually just 1 pass) 
then when using sizes. This is also the cause of another way in which 
ConcurrentLRUCache is different from LRUCache i.e. LRUCache uses both maxRamMB 
and size for eviction but ConcurrentLRUCache uses only one of them at a time. 
Therefore there was no need to track ram usage if we weren't going to use them.

That being said, tracking ram bytes is not that expensive that we couldn't do 
it by default. But we still cannot support both maxRamMB and max size together.

> Expose a total size stat for the query result and filter cache
> --
>
> Key: SOLR-11204
> URL: https://issues.apache.org/jira/browse/SOLR-11204
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: Varun Thacker
>Priority: Minor
>
> It will be useful to display the size of the filter cache and query result 
> cache currently being used . We added support for this to the field cache in 
> SOLR-9844



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-11204) Expose a total size stat for the query result and filter cache

2017-08-09 Thread Varun Thacker (JIRA)

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

Varun Thacker commented on SOLR-11204:
--

Some observations:

1. Should {[ConcurrentLRUCache#ramBytesUsed}} synchronize on the map variable 
like {[LRUCache#ramBytesUsed}} ?
2. LRUCache  and ConcurrentLRUCache only tracks ramBytesUsed when {{maxRamMB}} 
is enabled. LRUCache exposes ( which document cache / query result cache uses 
by default ) but FastLRUCache doesn't ( which is used by filter cache by 
default )

- How much of an overhead is calculating ramBytesUsed ? If it isn't then we can 
we do it even when {maxRamMB}} is not used? That way a user who specifies max 
entries can atleast see in the UI how much heap space are the caches occupying




> Expose a total size stat for the query result and filter cache
> --
>
> Key: SOLR-11204
> URL: https://issues.apache.org/jira/browse/SOLR-11204
> Project: Solr
>  Issue Type: Improvement
>  Security Level: Public(Default Security Level. Issues are Public) 
>Reporter: Varun Thacker
>Priority: Minor
>
> It will be useful to display the size of the filter cache and query result 
> cache currently being used . We added support for this to the field cache in 
> SOLR-9844



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org