[infinispan-dev] Very confusing L1 cache configuration defaults
Galder Zamarreño
galder at redhat.com
Wed Mar 28 05:09:09 EDT 2012
Hmmmm, not sure I understand the question. I'll get this fixed up as part of ISPN-1924, but with 5.1.x stuff going on right now, no time for that.
On Mar 27, 2012, at 11:14 AM, Manik Surtani wrote:
> Your analysis below is correct BTW, Galder. Where are we now with this, post-ISPN-1924?
>
> On 22 Mar 2012, at 12:15, Galder Zamarreño wrote:
>
>> While working on https://issues.jboss.org/browse/ISPN-1924, I've found myself asking a lot of the questions below, so let me try to add some light...
>>
>> On Mar 21, 2012, at 3:21 PM, Michal Linhard wrote:
>>
>>> Hi,
>>>
>>> when I was trying to figure out what is the L1 default configuration
>>>
>>> The JDG default: DISABLED
>>>
>>> when there is no l1-lifespan attribute in the element <distributed-cache
>>> />, L1 is disabled.
>>>
>>> The Infinispan default: DISABLED
>>>
>>> when there is no <l1/> element under <clustering/> element, or the <l1/>
>>> element is empty, L1 is disabled.
>>>
>>> However the hardwired default in the code is different:
>>> https://github.com/infinispan/infinispan/blob/master/core/src/main/java/org/infinispan/configuration/cache/L1ConfigurationBuilder.java#L36
>>> the enabled field is set to true.
>>
>> ^ The reason for this is because the old org.infinispan.config.Configuration.L1Type.enabled is true
>>
>> The builder just matches what used to happen in the old config.
>>
>>>
>>> this also means that L1ConfigurationBuilder prints a debug message: " L1
>>> is enabled and L1OnRehash was not defined, enabling it" even though L1
>>> won't be enabled in the end.
>>>
>>>
>>> The L1 is disabled because of the "activated" attribute.
>>> All I need to change is one attribute of L1Configuration (even unrelated
>>> to enablement) to "activate" it and it becomes enabled.
>>
>> Again, I think this activated thing is legacy code again.
>>
>>>
>>> I don't know what is the purpose of the "activated" attribute, it seems
>>> to be there for LegacyConfigurationAdaptor's purposes.
>>> But when we get rid of it we might make L1 by default enabled (by mistake)
>>
>> I don't think so, the activated stuff is there for legacy.
>>
>>>
>>> What's the desired default ?
>>> IMO L1 should be disabled by default, because without proper eviction
>>> settings, user can't very much control what's in each node's memory. And
>>> in general the performance tests don't show it performs better.
>>>
>>> Shouldn't we sync these ?
>>> Either set enabled = false in L1ConfigurationBuilder or allow enablement
>>> by default.
>>
>> Leave it with me for ISPN-1924 (5.2) and I'll try to do both:
>>
>> L1ConfigurationBuilder.enabled = false
>>
>> And get rid of this activated flag that confuses things.
>>
>> For ISPN-1924, I've been running the testsuite with the old configuration still in place.
>>
>> This is a good thing because it means that whatever old configuration we had, it should still behave the same way.
>>
>> So, I can easily test this and make sure that old L1 configuration will still work the same.
>>
>>>
>>> m.
>>>
>>> --
>>> Michal Linhard
>>> Quality Assurance Engineer
>>> JBoss Datagrid
>>>
>>> Red Hat Czech s.r.o.
>>> Purkynova 99 612 45 Brno, Czech Republic
>>> phone: +420 532 294 320 ext. 62320
>>> mobile: +420 728 626 363
>>>
>>> _______________________________________________
>>> infinispan-dev mailing list
>>> infinispan-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>
>> --
>> Galder Zamarreño
>> Sr. Software Engineer
>> Infinispan, JBoss Cache
>>
>>
>> _______________________________________________
>> infinispan-dev mailing list
>> infinispan-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
> --
> Manik Surtani
> manik at jboss.org
> twitter.com/maniksurtani
>
> Lead, Infinispan
> http://www.infinispan.org
>
>
>
>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache
More information about the infinispan-dev
mailing list