<div dir="auto"><div><br></div><div dir="auto"><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">On Mar 23, 2017 12:16 PM, "Juan Hernández" <<a href="mailto:jhernand@redhat.com">jhernand@redhat.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="elided-text">On 03/23/2017 11:05 AM, Roy Golan wrote:<br>
> Lately we came across an interesting case where multi-host+mult-networks<br>
> resulted editing a host to conclude in minutes. One assumption that was<br>
> raised which we wanted to eliminate was that the decryption we perform<br>
> on a fence agent password might be taking too long.<br>
><br>
> So these days it's an easy task thanks to JMH[1], supplied by the jdk<br>
> itself. I kickstarted [2] and added a 'DecryptionBenchmark', see the<br>
> output as an example[3]<br>
><br>
> Although The JMH project recommends to create a separate project I find<br>
> it would be less trivial to people to contribute benchmarks let alone<br>
> just playing around with current code they want to test.<br>
><br>
> - So, (when it will be merged) you add your benchmark under<br>
> backend/manager/modules/<wbr>benchmarks/MyBenchmark.java<br>
><br>
> - run it from intellij using the jmh plugin exactly like a unit-test<br>
> OR<br>
> - mvn test -P benchmarks -pl org.ovirt.engine:benchmarks<br>
> OR<br>
> - java -jar benchmarks.jar<br>
><br>
> I hope this would serve all of us well, please review and add your<br>
> benchmarks.<br>
><br>
> PS - this will not run in the CI atm.<br>
><br>
> [1] <a href="http://openjdk.java.net/projects/code-tools/jmh/" rel="noreferrer" target="_blank">http://openjdk.java.net/<wbr>projects/code-tools/jmh/</a><br>
> [2] <a href="https://gerrit.ovirt.org/74537" rel="noreferrer" target="_blank">https://gerrit.ovirt.org/74537</a> microbenchmarks: Introduce<br>
> microbenchmarks using JMH<br>
> [3] DecryptionBenchmark output (short version):<br>
><br>
> # Run complete. Total time: 00:09:06<br>
><br>
> Benchmark Mode Samples Score Score error Units<br>
> b.DecryptionBenchmark.<wbr>decryption thrpt 50 101.258 1.270 ops/s<br>
> b.DecryptionBenchmark.<wbr>encryption thrpt 50 238.587 4.667 ops/s<br>
> b.DecryptionBenchmark.<wbr>decryption avgt 50 0.010 0.000 s/op<br>
> b.DecryptionBenchmark.<wbr>encryption avgt 50 0.004 0.000 s/op<br>
> b.DecryptionBenchmark.<wbr>decryption sample 5544 0.010 0.000 s/op<br>
> b.DecryptionBenchmark.<wbr>encryption sample 13067 0.004 0.000 s/op<br>
> b.DecryptionBenchmark.<wbr>decryption ss 50 0.014 0.001 s<br>
> b.DecryptionBenchmark.<wbr>encryption ss 50 0.009 0.001 s<br>
><br>
> Process finished with exit code 0<br>
><br>
<br>
</div>Very interesting Roy, thanks.<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Indeed! </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra" dir="auto"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
What was the root cause of the host edit taking minutes?<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">No. </div><div dir="auto">Juan - your original thought that the encrypt / decrypt are there due to way too many queries was right. In the env there were around 1800 calls to get all the hosts due to network checks that ran there. </div><div dir="auto"><br></div><div dir="auto">We just wanted to check whether the encryption and decryption has any impact in addition, and Roy looked into it and saw it doesn't impact much. </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra" dir="auto"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
______________________________<wbr>_________________<br>
Devel mailing list<br>
<a href="mailto:Devel@ovirt.org">Devel@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/devel</a><br>
<br>
<br>
</blockquote></div><br></div></div></div>