<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Apr 13, 2013 at 3:02 AM, Sanne Grinovero <span dir="ltr">&lt;<a href="mailto:sanne@hibernate.org" target="_blank">sanne@hibernate.org</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">that&#39;s right, as suggested by Emmanuel I plan to separate the JGroups<br>
Sync/Async options from the worker.execution property so you can play<br>
with the two independently.<br>
I think the JGroups option&#39;s default could depend on the backend - if<br>
not otherwise specified, and if we all agree it doesn&#39;t make it too<br>
confusing.<br>
<br>
@All, the performance problem seemed to be caused by a problem in<br>
JGroups, which I&#39;ve logged here:<br>
<a href="https://issues.jboss.org/browse/JGRP-1617" target="_blank">https://issues.jboss.org/browse/JGRP-1617</a><br>
<br>
For the record, the first operation was indeed triggering some lazy<br>
initialization of indexes, which in turn would trigger a Lucene<br>
Directory being started, triggering 3 Cache starts which in turn would<br>
trigger 6 state transfer processes: so indeed the first operation<br>
would not be exactly &quot;cheap&quot; performance wise, still this would<br>
complete in about 120 milliseconds.<br>
The same cost is paid again when the second node is hit the first<br>
time, after that index write operations block the writer for &lt;1ms (not<br>
investigated further on potential throughput).<br>
<br>
Not being sure about the options of depending to a newer JGroups<br>
release or the complexity of a fix, I&#39;ll implement a workaround in<br>
HSearch in the scope of HSEARCH-1296.<br>
<br>
As a lesson learned, I think we need to polish some of our TRACE level<br>
messaged to include the cache name: </blockquote><div><br></div><div><br>Sanne, we already push the cache name in the NDC if trace is enabled for the &quot;entry point&quot; of the thread. So for your purpose, I think enabling trace for org.infinispan.interceptors.InvocationContextInterceptor and including %x in your pattern layout should work.<br>

<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">to resolve this we had not just<br>
many threads and components but also 4 of them where using JGroups<br>
(interleaving messages of all sorts) and 9 different caches where<br>
involved for each simple write operation in CD: made it interesting to<br>
figure what was going on! Also I&#39;m wondering how hard it would be to<br>
have a log parser which converts my 10GB of text log from today in a<br>
graphical sequence diagram.<br>
Big thanks to Mircea who helped me figuring this out.<br>
<span class=""><font color="#888888"><br>
Sanne<br>
</font></span><div class=""><div class="h5"><br>
On 12 April 2013 21:10, Ales Justin &lt;<a href="mailto:ales.justin@gmail.com">ales.justin@gmail.com</a>&gt; wrote:<br>
&gt; I think we need more fine-grained config for this new JGroups sync feature.<br>
&gt;<br>
&gt; I added this to our cache config<br>
&gt;<br>
&gt;                         &lt;property name=&quot;hibernate.search.default.worker.execution&quot;&gt;async&lt;/property&gt;<br>
&gt;<br>
&gt; and it broke our tests.<br>
&gt;<br>
&gt; Where previous (old / non JGroups sync) behavior worked.<br>
&gt;<br>
&gt; It of course also works  without this async config,<br>
&gt; but in this case we don&#39;t need sync / ACK JGroups message.<br>
&gt; (we didn&#39;t have one before and it worked ;-)<br>
&gt;<br>
&gt; -Ales<br>
&gt;<br>
&gt; On Apr 11, 2013, at 11:51 PM, Sanne Grinovero &lt;<a href="mailto:sanne@hibernate.org">sanne@hibernate.org</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; There is a &quot;blackhole&quot; indexing backend, which pipes all indexing<br>
&gt;&gt; requests &gt; /dev/null<br>
&gt;&gt;<br>
&gt;&gt; Set this as an Infinispan Query configuration property:<br>
&gt;&gt;<br>
&gt;&gt;    default.worker.backend = blackhole<br>
&gt;&gt;<br>
&gt;&gt; Of course that means that the index will not be updated: you might<br>
&gt;&gt; need to adapt your test to tolerate that, but the point is not<br>
&gt;&gt; functional testing but to verify how much the SYNC option on the<br>
&gt;&gt; JGroups backend is actually slowing you down. I suspect the<br>
&gt;&gt; performance penalty is not in the network but in the fact you&#39;re now<br>
&gt;&gt; waiting for the index operations, while in async you where not waiting<br>
&gt;&gt; for them to be flushed.<br>
&gt;&gt;<br>
&gt;&gt; If you can identify which part is slow, then we can help you with<br>
&gt;&gt; better configuration options.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On 11 April 2013 20:47, Ales Justin &lt;<a href="mailto:ales.justin@gmail.com">ales.justin@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt; What do you mean?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Apr 11, 2013, at 21:41, Sanne Grinovero &lt;<a href="mailto:sanne@hibernate.org">sanne@hibernate.org</a>&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; You could try the new sync version but setting the blackhole backend on the<br>
&gt;&gt;&gt; master node to remove the indexing overhead from the picture.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Apr 11, 2013 8:39 PM, &quot;Sanne Grinovero&quot; &lt;<a href="mailto:sanne@hibernate.org">sanne@hibernate.org</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Are you sure that the async version actually had applied all writes to the<br>
&gt;&gt;&gt;&gt; index in the measured interval?<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; On Apr 11, 2013 8:13 PM, &quot;Ales Justin&quot; &lt;<a href="mailto:ales.justin@gmail.com">ales.justin@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Although this change fixes query lookup,<br>
&gt;&gt;&gt;&gt;&gt; it adds horrible performance:<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Running CapeDwarf cluster QueryTest:<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; with HSEARCH-1296<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; 21:00:27,188 INFO<br>
&gt;&gt;&gt;&gt;&gt; [org.hibernate.search.indexes.impl.DirectoryBasedIndexManager]<br>
&gt;&gt;&gt;&gt;&gt; (http-/192.168.1.102:8080-1) HSEARCH000168: Serialization service Avro<br>
&gt;&gt;&gt;&gt;&gt; SerializationProvider v1.0 being used for index<br>
&gt;&gt;&gt;&gt;&gt; &#39;default_capedwarf-test__com.google.appengine.api.datastore.Entity&#39;<br>
&gt;&gt;&gt;&gt;&gt; 21:01:17,911 INFO  [org.jboss.web] (ServerService Thread Pool -- 49)<br>
&gt;&gt;&gt;&gt;&gt; JBAS018224: Unregister web context: /capedwarf-tests<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; 50sec<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; old 4.2.0.Final HS<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; 21:08:19,988 INFO<br>
&gt;&gt;&gt;&gt;&gt; [org.hibernate.search.indexes.impl.DirectoryBasedIndexManager]<br>
&gt;&gt;&gt;&gt;&gt; (http-/192.168.1.102:8080-2) HSEARCH000168: Serialization service Avro<br>
&gt;&gt;&gt;&gt;&gt; SerializationProvider v1.0 being used for index<br>
&gt;&gt;&gt;&gt;&gt; &#39;default_capedwarf-test__com.google.appengine.api.datastore.Entity&#39;<br>
&gt;&gt;&gt;&gt;&gt; 21:08:20,829 INFO  [org.jboss.web] (ServerService Thread Pool -- 49)<br>
&gt;&gt;&gt;&gt;&gt; JBAS018224: Unregister web context: /capedwarf-tests<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; 841ms<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; ---<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; I added<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;                    &lt;property name=&quot;enable_bundling&quot;&gt;true&lt;/property&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; to AS jgroups transport config, but no improvement.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Any (other) idea?<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; -Ales<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt;&gt; hibernate-dev mailing list<br>
&gt;&gt;&gt;&gt;&gt; <a href="mailto:hibernate-dev@lists.jboss.org">hibernate-dev@lists.jboss.org</a><br>
&gt;&gt;&gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/hibernate-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/hibernate-dev</a><br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; hibernate-dev mailing list<br>
&gt; <a href="mailto:hibernate-dev@lists.jboss.org">hibernate-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/hibernate-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/hibernate-dev</a><br>
_______________________________________________<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>