On 7/9/2015 9:48 AM, wwang525 wrote:
> I did a load test with a total of 800 requests (at 40 concurrent requests
> per second) to be executed against Solr index with 14 M records. Performance
> was good (< 1 second) especially after a short period of time of the test.
> BTW, the second round of load test was even better.
>
> The local machine has a free memory of about 15 G during the load test
>
> I observed the following from the stats page:
>
> (1) documentCache reached the configured size for documentCache with a hit
> ratio of 0.66
> (2) filterCache has 2519 hits with a hit ratio of 0.63. The size is 1465
> (less than a configured size: 16384)
> (3) queryResultCache has a hit ratio of 0
> (4) fieldValueCache has a hit ratio of 0
>
> The following are the cache configuration in solrconfig.xml
>
>  <documentCache
>       class="solr.LRUCache"
>       size="16384"
>       initialSize="512"
>       autowarmCount="0"/>
>
>
> <filterCache
>       class="solr.LRUCache"
>       size="16384"
>       initialSize="4096"     
>       autowarmCount="256"/>
>
>
> <queryResultCache
>       class="solr.LRUCache"
>       size="16384"
>       initialSize="4096"
>       autowarmCount="256"/>
>
> It looks like I need to increase the size of documentCache. The hit ratio of
> zero for queryResultCache and fieldValueCache was surprising (zero). Is it
> possible that this is due to randomly generated requests? 

I would say that a hitrate of 0.66 for your documentCache is pretty
good.  You can increase the size to try and make it better, but that
will use more java heap memory.  Note that I am not specifically talking
about the 15GB of free memory that you mentioned -- that's the operating
system, not Java.  Depending on what exactly is happening with Java's
memory management, that additional heap memory *might* come out of the
15GB, but it might not.

Cache sizes of 16384 are VERY large.  Your filterCache could actually be
dropped quite a bit, because it only has 1465 entries.  The
autowarmCount settings are a little high.  Executing 256 filters (which
would be required on every single commit) can be slow.

You may want to use FastLRUCache instead of LRUCache for documentCache
and filterCache, because your  hitrate is good.  LRUCache is better when
the hitrate is lower.

The fieldValueCache is an internal cache that Solr and Lucene use and
manage.  I don't know much about it.

If you don't send the same query more than once, then your
queryResultCache will have a hitrate of zero.

Thanks,
Shawn

Reply via email to