<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I have often thought of this. &nbsp;Comments inline:<div><br><div><div>On 19 Jun 2013, at 13:44, William Burns &lt;<a href="mailto:mudokonman@gmail.com">mudokonman@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">All the L1 data for a DIST cache is stored in the same data container as the actual distributed data itself. &nbsp;I wanted to propose breaking this out so there is a separate data container for the L1 cache as compared to the distributed data.<div>
<br></div><div style="">I thought of a few quick benefits/drawbacks:</div><div><br></div><div style="">Benefits:</div><div style="">1. L1 cache can be separately tuned - L1 maxEntries for example<br></div><div style="">2. L1 values will not cause eviction of real data</div>
<div style="">3. Would make&nbsp;<a href="https://issues.jboss.org/browse/ISPN-3229">https://issues.jboss.org/browse/ISPN-3229</a>&nbsp;an easy fix</div><div style="">4. Could add a new DataContainer implementation specific to L1 with additional optimizations</div>
<div style="">5. Help with some concurrency issues with L1 without requiring wider locking (such as locking a key for an entire ClusteredGet rpc call) -&nbsp;<a href="https://issues.jboss.org/browse/ISPN-3197">https://issues.jboss.org/browse/ISPN-3197</a>.</div>
<div style=""><br></div><div style="">Drawbacks:</div><div style="">1. Would require, depending on configuration, an additional thread for eviction</div></div></blockquote><div><br></div><div>Not really - the same eviction thread used for the main data container could also clean things up in the L1 DC.</div><br><blockquote type="cite"><div dir="ltr"><div style="">2. Users upgrading could have double memory used up due to 2 data containers</div></div></blockquote><div><br></div><div>This is just a fixed (and small) overhead. &nbsp;Not actually double the memory used by the entire grid.</div><div><br></div><div>Additional drawbacks:</div><div>- More complex lookups in the DC. &nbsp;Code that would otherwise just call DC.get() would now need to also check L1DC. &nbsp;This would be scattered all over the code-base - unless perhaps the main DC would implicitly also check the contents of the L1DC (if one is available).</div><br><blockquote type="cite"><div dir="ltr">
<div style=""><br></div><div style="">Both?:</div><div style="">1. Additional configuration available<br></div><div style="">&nbsp; &nbsp;a. Add maxEntires just like the normal data container (use data container size if not configured?)</div><div style="">
&nbsp; &nbsp;b. Eviction wakeup timer? &nbsp;We could just reuse the task cleanup frequency?</div><div style="">&nbsp; &nbsp;c. Eviction strategy? &nbsp;I would think the default data container's would be sufficient.</div><div style=""><br></div><div style="">
I was wondering what you guys thought.</div><div style=""><br></div><div style="">Thanks,</div><div style=""><br></div><div style="">&nbsp;- Will</div></div>
_______________________________________________<br>infinispan-dev mailing list<br><a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/infinispan-dev</blockquote></div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>--</div><div>Manik Surtani</div><div><a href="mailto:manik@jboss.org">manik@jboss.org</a></div><div><a href="http://twitter.com/maniksurtani">twitter.com/maniksurtani</a></div><div><br></div><div><div>Platform Architect, JBoss Data Grid</div><div><a href="http://red.ht/data-grid">http://red.ht/data-grid</a></div></div></div></span></div></span></div></span>
</div>
<br></div></body></html>