lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: SOLR-571:LRUCache autowarmCount should support percentages
Date Tue, 20 Apr 2010 05:25:19 GMT

: what is the meaning of 50%? 50% of all queries fired since the last
: searcher opened? sounds like a bad idea.

the motivation behind it is stated in the issue....

>> the autowarmCount for LRUCaches should support "percentages" which get 
>> evaluated relative the current size of the cache when warming happens.

>> in this way, a Solr instance might be configured with 
>> autowarmCount="50%" to autowarm the top half of the queries ... a 
>> master machine might be configured this way to give some autowarming if 
>> it is inadvertently being queried, but things won't be maintained in 
>> the caches in perpetuity ... each subsequent cache instance would have 
>> fewer and fewer of the "old" queries warmed automatically.

...why would that be bad?

: > I was thinking in modify both, the FastLRUCache and the LRUCache to allow
: > percentages (as well as absolute values of course) on "autowarmCount"
: > parameter, and in the case of a percentage, simply evaluate it on the "init"
: > method.

The percentage string can be parsed on init, but to be useful the actual 
computation against the "size" needs to be done on each autowarm call so 
that if it's 50% it's warms half the the size of hte cache at the time 
it's warmed -- if you compute what 50% of the size is during init, then it 
defeats the point.


-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message