You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tez.apache.org by "Rajesh Balamohan (JIRA)" <ji...@apache.org> on 2015/11/02 10:01:27 UTC
[jira] [Updated] (TEZ-2918) Make progress notifications in IOs
[ https://issues.apache.org/jira/browse/TEZ-2918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rajesh Balamohan updated TEZ-2918:
----------------------------------
Attachment: jmh-microbenchmark.tar.gz
Tried out a simple JMH microbenchmark which updates boolean vs volatile boolean. Attached the src details here and the results are as follows
{noformat}
Benchmark Mode Cnt Score Error Units
TestVolatileMicrobenchmark.write_atomic_boolean_with_lazyset avgt 5 1.085 ± 1.466 ns/op
TestVolatileMicrobenchmark.write_plain_boolean avgt 5 0.647 ± 0.322 ns/op
TestVolatileMicrobenchmark.write_volatile_boolean avgt 5 9.694 ± 6.095 ns/op
{noformat}
It appears that the volatile is a lot more expensive that the non-volatile writes by 9x times. Since it is getting updated by a single writer, I tried with AtomicBoolean.lazySet(boolean) which claims to be a lot more faster than volatile and results show that it is a lot better compared to volatile (just ~2x as compared to 9x in volatile). Ref for atomic lazySet http://mithun-ruikar.blogspot.in/2014/10/why-atomic-lazyset-is-faster.html, http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6275329. May be we could consider using AtomicBoolean.lazySet() which is internally supported by JDK itself?
> Make progress notifications in IOs
> ----------------------------------
>
> Key: TEZ-2918
> URL: https://issues.apache.org/jira/browse/TEZ-2918
> Project: Apache Tez
> Issue Type: Sub-task
> Reporter: Bikas Saha
> Assignee: Bikas Saha
> Attachments: TEZ-2918.1.patch, TEZ-2918.2.patch, jmh-microbenchmark.tar.gz
>
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)