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 "Burton-West, Tom" <tb...@umich.edu> on 2010/10/02 01:27:40 UTC

Estimating memory use for Solr caches

We are having some memory and GC issues.  I'm trying to get a handle on the contribution of the Solr caches.  Is there a way to estimate the amount of memory used by  the documentCache and the queryResultCache?

I assume if we know the average size of our stored fields we can just multiply the size of the documentCache by the average size of the stored fields.
We store author, title, date, and id.  For each document this is likely to be less than 1 KB so if we set documentCache size=50,000 that should be 50MB.  Is that about right?

Alternatively, could we calculate this based on the size of the fdt file?  Our on disk fdt file that stores the stored field data is 16MB so in theory if the stored data for all the documents in our index were in the documentCache, it shouldn't exceed 16MB, plus some overhead.  Does this make sense?

queryResultCache stores a list of docIDs.  I assume these are Java ints but the number depends on the number of hits. Is there a good way to estimate (or measure:)  the size of this in memory?


Tom Burton-West