On Mon, Oct 19, 2009 at 4:29 AM, Lance Norskog <[email protected]> wrote:
> -1 for weak references in caching.
>
> This makes memory management less deterministic (predictable) and at
> peak can cause cache-thrashing. In other words, the worst case gets
> even more worse. When designing a system I want predictability and I
> want to control the worst case, because system meltdowns are caused by
> the worst case. Having thousands of small weak references does the
> opposite.
cache trashing is really not that bad (as against system crashing with
OOM). Documentation of softReference spcifically mentions caches as
one of the applications
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ref/SoftReference.html
>
> On Sat, Oct 17, 2009 at 2:00 AM, Noble Paul (JIRA) <[email protected]> wrote:
>>
>>    [ 
>> https://issues.apache.org/jira/browse/SOLR-1513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766864#action_12766864
>>  ]
>>
>> Noble Paul commented on SOLR-1513:
>> ----------------------------------
>>
>> bq.Google Collections is already checked in as a dependency of Carrot 
>> clustering.
>>
>> in that e need to move it to core.
>>
>> Jason . We do not need to remove the original option. We can probably add an 
>> extra parameter say softRef="true" or something. That way , we are not 
>> screwing up anything and perf benefits can be studied separately.
>>
>>
>>> Use Google Collections in ConcurrentLRUCache
>>> --------------------------------------------
>>>
>>>                 Key: SOLR-1513
>>>                 URL: https://issues.apache.org/jira/browse/SOLR-1513
>>>             Project: Solr
>>>          Issue Type: Improvement
>>>          Components: search
>>>    Affects Versions: 1.4
>>>            Reporter: Jason Rutherglen
>>>            Priority: Minor
>>>             Fix For: 1.5
>>>
>>>         Attachments: google-collect-snapshot.jar, SOLR-1513.patch
>>>
>>>
>>> ConcurrentHashMap is used in ConcurrentLRUCache.  The Google Colletions 
>>> concurrent map implementation allows for soft values that are great for 
>>> caches that potentially exceed the allocated heap.  Though I suppose Solr 
>>> caches usually don't use too much RAM?
>>> http://code.google.com/p/google-collections/
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> You can reply to this email to add a comment to the issue online.
>>
>>
>
>
>
> --
> Lance Norskog
> [email protected]
>



-- 
-----------------------------------------------------
Noble Paul | Principal Engineer| AOL | http://aol.com
          • Re: [... Mark Miller
            • ... Shalin Shekhar Mangar
              • ... Mark Miller
              • ... Noble Paul നോബിള്‍ नोब्ळ्
              • ... Mark Miller
              • ... Noble Paul നോബിള്‍ नोब्ळ्
              • ... Bill Au
              • ... Shalin Shekhar Mangar
              • ... Lance Norskog
              • ... Noble Paul നോബിള്‍ नोब्ळ्
      • Re: [jira] Co... Noble Paul നോബിള്‍ नोब्ळ्
  • [jira] Issue Comment E... Noble Paul (JIRA)
  • [jira] Updated: (SOLR-... Jason Rutherglen (JIRA)

Reply via email to