Question about Solr caching mechanism

Sti*_*n V 6 solr

I'm working at a Apache Solr project. ( distributed in a cloud environment - Amazon ec2 instances ).

I've noticed Solr does an excellent job in caching the results. When I execute the same queries again - the respons states Solr QTime 0 or 1 millisecond.

I want to stress test the Solr system. Therefore I have a limited list of queries I could use ( 50 000 unique queries ). The problem now is that all queries are cached!

When I stress test - after 5 mins or so - all my queries are given in Solr & executed. This makes the system sweat unther the heavy load :) ( witch was the purpose ). But then, as I execute the same query set again - QTime is almost zero! --> Solr has an easy time & isn't stressed.

My question: How can you turn of ALL Solr caches ( Both Solr and Lucence caches)? Or how can you limit the cache?

我试图关闭所有Solr实习生缓存,但缓存仍然存在.(QueryResultCache和FieldCache)注意:配置提到Lucence将管理内部缓存 - 也许这个缓存是问题?

奇怪的是,所有50 000个查询都可以存储在缓存中 - 开箱即用.

Mau*_*fer 6

您可以在配置中注释掉filterCache,queryResultCache和documentCache.Lucene的FieldCache无法禁用.

虽然这样做没有任何意义,即使是基准测试.您还会在操作系统中禁用磁盘缓存吗?CPU缓存(所有三个级别)?每个硬盘的内部缓存?

缓存是系统的一部分,如果禁用它们,则无法准确模拟生产中发生的情况,从而导致基准无用.