You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by sumitj25 <su...@gmail.com> on 2014/11/25 17:07:41 UTC

determine amount of memory used by different solr caches

Hi,

I posted a question on stackoverflow regarding this 
http://stackoverflow.com/questions/26909948/how-to-determine-amount-of-memory-used-by-different-solr-caches
<http://stackoverflow.com/questions/26909948/how-to-determine-amount-of-memory-used-by-different-solr-caches>  

Haven't received a response, so I am hoping to get the answer here. This is
the question

Solr wiki  https://wiki.apache.org/solr/SolrCaching
<http://wiki.apache.org/solr/SolrCaching>   states

filterCache stores unordered sets of document IDs that match the key

queryResultCache stores ordered sets of document IDs

What is the document id being referred to here? What is its size? Is it a
boolean bit vector with 1/0 for all documents present in the collection,
such that its size is equivalent to total docs * 1 bit? Mostly I am
concerned with changes in size of cache wrt number of indexed documents.

Also is there any way to get the exact size of each cache in bytes?



--
View this message in context: http://lucene.472066.n3.nabble.com/determine-amount-of-memory-used-by-different-solr-caches-tp4170900.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: determine amount of memory used by different solr caches

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
Have you looked in the Admin UI's Plugin and Stats' menu?
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=32604180
I believe there are cache sizes (in units) there and you can even lock
and compare to verify the impact of specific operations.

You may also find this article useful:
http://blog.florian-hopf.de/2014/05/solr-cache-sizes-eclipse-memory-analyzer.html

Regards,
   Alex.
Personal: http://www.outerthoughts.com/ and @arafalov
Solr resources and newsletter: http://www.solr-start.com/ and @solrstart
Solr popularizers community: https://www.linkedin.com/groups?gid=6713853


On 25 November 2014 at 11:07, sumitj25 <su...@gmail.com> wrote:
> Hi,
>
> I posted a question on stackoverflow regarding this
> http://stackoverflow.com/questions/26909948/how-to-determine-amount-of-memory-used-by-different-solr-caches
> <http://stackoverflow.com/questions/26909948/how-to-determine-amount-of-memory-used-by-different-solr-caches>
>
> Haven't received a response, so I am hoping to get the answer here. This is
> the question
>
> Solr wiki  https://wiki.apache.org/solr/SolrCaching
> <http://wiki.apache.org/solr/SolrCaching>   states
>
> filterCache stores unordered sets of document IDs that match the key
>
> queryResultCache stores ordered sets of document IDs
>
> What is the document id being referred to here? What is its size? Is it a
> boolean bit vector with 1/0 for all documents present in the collection,
> such that its size is equivalent to total docs * 1 bit? Mostly I am
> concerned with changes in size of cache wrt number of indexed documents.
>
> Also is there any way to get the exact size of each cache in bytes?
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/determine-amount-of-memory-used-by-different-solr-caches-tp4170900.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Re: determine amount of memory used by different solr caches

Posted by Erick Erickson <er...@gmail.com>.
Each of these is essentially a map where

filterCache:
   key: the filter query
   value: a bitmap of docs that satisfy the clause, i.e. maxDoc/8

Note, I'm cheating a little here, this is the max size of each entry.

queryResultCache:
   key: the query, probably the whole thing
   value: an array of integers queryResultWindowSize long (see
solrConfig.xml for queryResultWindowSize)..

Best,
Erick

On Tue, Nov 25, 2014 at 8:07 AM, sumitj25 <su...@gmail.com> wrote:
> Hi,
>
> I posted a question on stackoverflow regarding this
> http://stackoverflow.com/questions/26909948/how-to-determine-amount-of-memory-used-by-different-solr-caches
> <http://stackoverflow.com/questions/26909948/how-to-determine-amount-of-memory-used-by-different-solr-caches>
>
> Haven't received a response, so I am hoping to get the answer here. This is
> the question
>
> Solr wiki  https://wiki.apache.org/solr/SolrCaching
> <http://wiki.apache.org/solr/SolrCaching>   states
>
> filterCache stores unordered sets of document IDs that match the key
>
> queryResultCache stores ordered sets of document IDs
>
> What is the document id being referred to here? What is its size? Is it a
> boolean bit vector with 1/0 for all documents present in the collection,
> such that its size is equivalent to total docs * 1 bit? Mostly I am
> concerned with changes in size of cache wrt number of indexed documents.
>
> Also is there any way to get the exact size of each cache in bytes?
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/determine-amount-of-memory-used-by-different-solr-caches-tp4170900.html
> Sent from the Solr - User mailing list archive at Nabble.com.