[ 
https://issues.apache.org/jira/browse/YARN-6788?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sunil G updated YARN-6788:
--------------------------
    Attachment: YARN-6788-YARN-3926.021.patch

Updating a new patch addressing the concern regarding DCL.

By Quoting below links
# http://www.cs.umd.edu/~pugh/java/memoryModel/jsr-133-faq.html#synchronization
# 
https://www.securecoding.cert.org/confluence/display/java/LCK10-J.+Use+a+correct+form+of+the+double-checked+locking+idiom
# http://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html#jls-17.5

DCL is safer as per this design pattern (Volatile model). So quoting 1) and 2), 
we can convert all major variables which are written under synchronized block 
could be changed to volatile. This will cover the open loop holes which you 
mentioned. 3) explains the JMM for final variable which writes and flushes once 
thread exits block.

Based on these observations, i think its fine to change to volatile for now. We 
can open a ticket and discuss regarding other linear approaches, however as per 
this jira title, this does not affect performance (variable initializes only 
one when RM is started). So if its fine, we can go with this approach.
[~templedf] and [~leftnoteasy]

> Improve performance of resource profile branch
> ----------------------------------------------
>
>                 Key: YARN-6788
>                 URL: https://issues.apache.org/jira/browse/YARN-6788
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: nodemanager, resourcemanager
>            Reporter: Sunil G
>            Assignee: Sunil G
>            Priority: Blocker
>         Attachments: YARN-6788-YARN-3926.001.patch, 
> YARN-6788-YARN-3926.002.patch, YARN-6788-YARN-3926.003.patch, 
> YARN-6788-YARN-3926.004.patch, YARN-6788-YARN-3926.005.patch, 
> YARN-6788-YARN-3926.006.patch, YARN-6788-YARN-3926.007.patch, 
> YARN-6788-YARN-3926.008.patch, YARN-6788-YARN-3926.009.patch, 
> YARN-6788-YARN-3926.010.patch, YARN-6788-YARN-3926.011.patch, 
> YARN-6788-YARN-3926.012.patch, YARN-6788-YARN-3926.013.patch, 
> YARN-6788-YARN-3926.014.patch, YARN-6788-YARN-3926.015.patch, 
> YARN-6788-YARN-3926.016.patch, YARN-6788-YARN-3926.017.patch, 
> YARN-6788-YARN-3926.018.patch, YARN-6788-YARN-3926.019.patch, 
> YARN-6788-YARN-3926.020.patch, YARN-6788-YARN-3926.021.patch
>
>
> Currently we could see a 15% performance delta with this branch. 
> Few performance improvements to improve the same.
> Also this patch will handle 
> [comments|https://issues.apache.org/jira/browse/YARN-6761?focusedCommentId=16075418&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16075418]
>  from [~leftnoteasy].



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to