solr 的autowarming

 

当我把solr服务器启动好,用btrace监控IndexSearch.search()方法,我发现虽然没有任何地方用到查询,但也会被触发:

Search .execute time is:1028ms
Search .execute time is:20ms
Search .execute time is:16ms
Search .execute time is:981ms
Search .execute time is:154ms
Search .execute time is:920ms
Search .execute time is:746ms
Search .execute time is:754ms
Search .execute time is:743ms
Search .execute time is:731ms
Search .execute time is:737ms
Search .execute time is:736ms
Search .execute time is:868ms
Search .execute time is:882ms
Search .execute time is:841ms
Search .execute time is:28ms
Search .execute time is:172ms
Search .execute time is:191ms
Search .execute time is:55ms
Search .execute time is:910ms

 

我怀疑是因为master的索引文件跟新了之后,slave会自动做一次warmup,把之前的记录查询一次,在日志里面发现这些信息:

 

 

先看一段日志:

 

INFO: autowarming result for Searcher@20e68e11 main documentCache
{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=131928, cumulative_hits=131750,cumulative_hitratio=0.99,cumulative_inserts=178,cumulative_evictions=0}

Jul 12, 2012 11:23:20 AM org.apache.solr.core.SolrCore registerSearcher

 

INFO: [feed] Registered new searcher Searcher@20e68e11 main

 

Jul 12, 2012 11:23:20 AM org.apache.solr.search.SolrIndexSearcher close

 

INFO: Closing Searcher@34114882 main

fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}

filterCache{lookups=54,hits=48,hitratio=0.88,inserts=22,evictions=0,size=22,warmupTime=5355 ,cumulative_lookups=144, cumulative_hits=113,cumulative_hitratio=0.78,cumulative_inserts=31,cumulative_evictions=0}

queryResultCache{lookups=4136,hits=4130 ,hitratio=0.99,inserts=14,evictions=0,size=14,warmupTime=691 ,cumulative_lookups=5497 , cumulative_hits=5479,cumulative_hitratio=0.99,cumulative_inserts=18,cumulative_evictions=0}

 

documentCache{lookups=99264,hits=99240 ,hitratio=0.99,inserts=24,evictions=0,size=24,warmupTime=0,cumulative_lookups=131928 , cumulative_hits=131750,cumulative_hitratio=0.99,cumulative_inserts=178,cumulative_evictions=0}

 

 

 

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值