<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 23 Mar 2017, at 11:37, Roy Golan &lt;<a href="mailto:rgolan@redhat.com" class="">rgolan@redhat.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Thu, Mar 23, 2017, 12:25 PM Martin Sivak &lt;<a href="mailto:msivak@redhat.com" class="">msivak@redhat.com</a>&gt; wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br class="gmail_msg">
<br class="gmail_msg">
I am just wondering whether you tried Roman's Hystrix integration to<br class="gmail_msg">
see what command was so slow?<br class="gmail_msg"><br class="gmail_msg">
Martin<br class="gmail_msg"></blockquote></div><div class=""><br class=""></div><div class="">More on that in a different thread. Using only the debug logs it was quite easy to see that it was 13000+ queries to the db instead of one.</div></div></blockquote><div><br class=""></div>which thread?</div><div><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="gmail_msg">
On Thu, Mar 23, 2017 at 11:05 AM, Roy Golan &lt;<a href="mailto:rgolan@redhat.com" class="gmail_msg" target="_blank">rgolan@redhat.com</a>&gt; wrote:<br class="gmail_msg">
&gt; Lately we came across an interesting case where multi-host+mult-networks<br class="gmail_msg">
&gt; resulted editing a host to conclude in minutes. One assumption that was<br class="gmail_msg">
&gt; raised which we wanted to eliminate was that the decryption we perform on a<br class="gmail_msg">
&gt; fence agent password might be taking too long.<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; So these days it's an easy task thanks to JMH[1], supplied by the jdk<br class="gmail_msg">
&gt; itself. I kickstarted [2] and added a 'DecryptionBenchmark', see the output<br class="gmail_msg">
&gt; as an example[3]<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; Although The JMH project recommends to create a separate project I find it<br class="gmail_msg">
&gt; would be less trivial to people to contribute benchmarks let alone just<br class="gmail_msg">
&gt; playing around with current code they want to test.<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; - So, (when it will be merged) you add your benchmark under<br class="gmail_msg">
&gt;&nbsp; backend/manager/modules/benchmarks/MyBenchmark.java<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; - run it from intellij using the jmh plugin exactly like a unit-test<br class="gmail_msg">
&gt; OR<br class="gmail_msg">
&gt; - mvn test -P benchmarks -pl org.ovirt.engine:benchmarks<br class="gmail_msg">
&gt; OR<br class="gmail_msg">
&gt; - java -jar benchmarks.jar<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; I hope this would serve all of us well, please review and add your<br class="gmail_msg">
&gt; benchmarks.<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; PS - this will not run in the CI atm.<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; [1] <a href="http://openjdk.java.net/projects/code-tools/jmh/" rel="noreferrer" class="gmail_msg" target="_blank">http://openjdk.java.net/projects/code-tools/jmh/</a><br class="gmail_msg">
&gt; [2] <a href="https://gerrit.ovirt.org/74537" rel="noreferrer" class="gmail_msg" target="_blank">https://gerrit.ovirt.org/74537</a> microbenchmarks: Introduce<br class="gmail_msg">
&gt; microbenchmarks using JMH<br class="gmail_msg">
&gt; [3] DecryptionBenchmark output (short version):<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; # Run complete. Total time: 00:09:06<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; Benchmark&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Mode&nbsp; Samples&nbsp; &nbsp; Score&nbsp; Score error<br class="gmail_msg">
&gt; Units<br class="gmail_msg">
&gt; b.DecryptionBenchmark.decryption&nbsp; &nbsp; &nbsp;thrpt&nbsp; &nbsp; &nbsp; &nbsp;50&nbsp; 101.258&nbsp; &nbsp; &nbsp; &nbsp; 1.270<br class="gmail_msg">
&gt; ops/s<br class="gmail_msg">
&gt; b.DecryptionBenchmark.encryption&nbsp; &nbsp; &nbsp;thrpt&nbsp; &nbsp; &nbsp; &nbsp;50&nbsp; 238.587&nbsp; &nbsp; &nbsp; &nbsp; 4.667<br class="gmail_msg">
&gt; ops/s<br class="gmail_msg">
&gt; b.DecryptionBenchmark.decryption&nbsp; &nbsp; &nbsp; avgt&nbsp; &nbsp; &nbsp; &nbsp;50&nbsp; &nbsp; 0.010&nbsp; &nbsp; &nbsp; &nbsp; 0.000<br class="gmail_msg">
&gt; s/op<br class="gmail_msg">
&gt; b.DecryptionBenchmark.encryption&nbsp; &nbsp; &nbsp; avgt&nbsp; &nbsp; &nbsp; &nbsp;50&nbsp; &nbsp; 0.004&nbsp; &nbsp; &nbsp; &nbsp; 0.000<br class="gmail_msg">
&gt; s/op<br class="gmail_msg">
&gt; b.DecryptionBenchmark.decryption&nbsp; &nbsp; sample&nbsp; &nbsp; &nbsp;5544&nbsp; &nbsp; 0.010&nbsp; &nbsp; &nbsp; &nbsp; 0.000<br class="gmail_msg">
&gt; s/op<br class="gmail_msg">
&gt; b.DecryptionBenchmark.encryption&nbsp; &nbsp; sample&nbsp; &nbsp; 13067&nbsp; &nbsp; 0.004&nbsp; &nbsp; &nbsp; &nbsp; 0.000<br class="gmail_msg">
&gt; s/op<br class="gmail_msg">
&gt; b.DecryptionBenchmark.decryption&nbsp; &nbsp; &nbsp; &nbsp; ss&nbsp; &nbsp; &nbsp; &nbsp;50&nbsp; &nbsp; 0.014&nbsp; &nbsp; &nbsp; &nbsp; 0.001<br class="gmail_msg">
&gt; s<br class="gmail_msg">
&gt; b.DecryptionBenchmark.encryption&nbsp; &nbsp; &nbsp; &nbsp; ss&nbsp; &nbsp; &nbsp; &nbsp;50&nbsp; &nbsp; 0.009&nbsp; &nbsp; &nbsp; &nbsp; 0.001<br class="gmail_msg">
&gt; s<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; Process finished with exit code 0<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; _______________________________________________<br class="gmail_msg">
&gt; Devel mailing list<br class="gmail_msg">
&gt; <a href="mailto:Devel@ovirt.org" class="gmail_msg" target="_blank">Devel@ovirt.org</a><br class="gmail_msg">
&gt; <a href="http://lists.ovirt.org/mailman/listinfo/devel" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.ovirt.org/mailman/listinfo/devel</a><br class="gmail_msg">
</blockquote></div>
_______________________________________________<br class="">Devel mailing list<br class=""><a href="mailto:Devel@ovirt.org" class="">Devel@ovirt.org</a><br class="">http://lists.ovirt.org/mailman/listinfo/devel</div></blockquote></div><br class=""></body></html>