<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 19, 2013 at 1:27 PM, Sanne Grinovero <span dir="ltr">&lt;<a href="mailto:sanne@infinispan.org" target="_blank">sanne@infinispan.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5">On 19 June 2013 17:17, William Burns &lt;<a href="mailto:mudokonman@gmail.com">mudokonman@gmail.com</a>&gt; wrote:<br>

&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Wed, Jun 19, 2013 at 11:56 AM, Sanne Grinovero &lt;<a href="mailto:sanne@infinispan.org">sanne@infinispan.org</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; On 19 June 2013 16:44, cotton-ben &lt;<a href="mailto:ben.cotton@alumni.rutgers.edu">ben.cotton@alumni.rutgers.edu</a>&gt; wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; /&gt;&gt;    At the opposite site, I don&#39;t see how - as a user - I could<br>
&gt;&gt; &gt; optimally<br>
&gt;&gt; &gt;&gt;&gt;    tune a separate container.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; I agree that is more difficult to configure, this was one of my points<br>
&gt;&gt; &gt;&gt; as<br>
&gt;&gt; &gt;&gt; both a drawback and benefit.   It &gt; sounds like in general you don&#39;t<br>
&gt;&gt; &gt;&gt; believe the benefits outweigh the drawbacks then./<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Hi William.  The benefits of your ambition to provide  L1 capability<br>
&gt;&gt; &gt; enhancements -- for /certain/ user&#39;s completeness requirements--<br>
&gt;&gt; &gt; definitely<br>
&gt;&gt; &gt; outweigh the drawbacks . This is a FACT.<br>
&gt;&gt;<br>
&gt;&gt; I have to disagree ;-) It certainly is a fact that he&#39;s very well<br>
&gt;&gt; intentioned to make enhancements, but I don&#39;t this strategy is proven<br>
&gt;&gt; the be superior; I&#39;m actually convinced of the opposite.<br>
&gt;&gt;<br>
&gt;&gt; We simply cannot assume that the &quot;real data&quot; and the L1 stored entries<br>
&gt;&gt; will have the same level of hotness, it&#39;s actually very likely (since<br>
&gt;&gt; you like stats) that the entries stored in L1 are frequently accessed,<br>
&gt;&gt; to the opposite of other entries which - for as far as we know - could<br>
&gt;&gt; be large and dormant for years.<br>
&gt;<br>
&gt; Actually this is only half true, we know that the values are hot on this<br>
&gt; node specifically.  Other nodes could be requesting the &quot;cold&quot; data quite<br>
&gt; frequently as well.<br>
<br>
</div></div>I see where you&#39;re coming from, but my point is the opposite: if other<br>
nodes would be requesting this data quite frequently, it woudln&#39;t be<br>
considered &quot;cold&quot;: by using a single data container the eviction<br>
strategy automatically takes this into account as well. A hit is a hit<br>
in all senses.<br></blockquote><div style>Yeah but a hit in the L1 doesn&#39;t constitute a hit on the owner is what I was getting at.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div class="im"><br>
&gt; This could lead to L1 values pushing out distributed<br>
&gt; data leaving it where nodes have L1 cached values for which the owner<br>
&gt; doesn&#39;t even own.<br>
<br>
</div>That&#39;s just another excellent reason to keep a unified datacontainer:<br>
if a different node uses the value frequently, allow it to be cached<br>
for read operations, even if the primary owner is passivating it.<br>
Write operations are inherently safe as they have to go through the<br>
owner and trigger entry activation as needed.<br></blockquote><div style>I think this may be a disconnect, I was thinking if they didn&#39;t have passivation.  I agree with passivation, there is really no reason to worry.  Although I still think you wouldn&#39;t want to passivate a L1 cache entry as it would most likely be faster to hit the owning node and actually would cause a hit on the owning nodes.</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im"><br>
&gt; And when the L1 cache value expires there will be no more<br>
&gt; backup (not including passivation).  This is a very odd situation though,<br>
&gt; since you can&#39;t do conditional operations then as well.<br>
<br>
</div>Conditional operations would hit the owner, and by doing so trigger<br>
loading. Not too odd, as it&#39;s the design today.<br></blockquote><div style>Same as previous - issue with no passivation.<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div class="im"><br>
<br>
&gt; And even with separate containers this is possible to have the L1<br>
&gt; discrepency, but actually having a lower lifespan would help remedy this<br>
&gt; since every once in a while the &quot;hot&quot; value would have to retrieved again<br>
&gt; from the owning node.<br>
<br>
</div>Should be unnecessary, consistency is guaranteed no matter what<br>
timeouts of lifespans are set.<br></blockquote><div>Same as previous - issue with no passivation. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div class="im"><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Storing useless data in memory is going to force to evict entries from<br>
&gt;&gt; L1 which are hot by definition (as they wouldn&#39;t be in L1 otherwise -<br>
&gt;&gt; as you pointed out there likely is an expiry) is a strategy which<br>
&gt;&gt; actively strives towards a less efficient storage.<br>
&gt;&gt;<br>
&gt;&gt; Also L1 timeout can be disabled, making for a very nice self-tuning<br>
&gt;&gt; adaptive system.<br>
&gt;<br>
&gt; The value cannot be disabled for the timeout.  Unless by disable you mean to<br>
&gt; increase the timeout so high that it will never be hit?  Is that a common<br>
&gt; use case?<br>
<br>
</div>Sure why not, any read-mostly system would benefit from it: think of<br>
video streaming services, online stores (amazon like or app stores),<br>
news papers. Basically, most systems on which I&#39;d suggest to enable<br>
L1.<br>
BTW I think L1&#39;s lifespan accepts a -1 as well, which should result in<br>
immortal cache entries.<br></blockquote><div style>Checking the L1ConfigurationBuilder it throws an exception if there is a value &lt; 1.</div><div style><br></div><div style><div>  public void validate() {</div><div>      if (enabled) {</div>
<div>         ...</div><div>         if (lifespan &lt; 1)</div><div>            throw new ConfigurationException(&quot;Using a L1 lifespan of 0 or a negative value is meaningless&quot;);</div><div><br></div><div>      }</div>
<div>   ...</div><div>   }</div></div><div style><br></div><div style> I am wondering if this should be changed then to allow a -1 since it is a common use case to allow for never expiring L1 entries.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<span class=""><font color="#888888"><br>
Sanne<br>
</font></span><div class=""><div class="h5">_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
</div></div></blockquote></div><br></div></div>