[
https://issues.apache.org/jira/browse/YARN-9805?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16928800#comment-16928800
]
Ahmed Hussein commented on YARN-9805:
-------------------------------------
[~Jim_Brennan] I agree with you.
It would be better to add a performance test case to evaluate throughput
before-and-after the changes. The test may also evaluate concurrency since
there is speculation that the system runs as single threaded anyway. Therefore
synchronization is not required.
In general my concerns regarding the existing implementation are:
* The synchronization in scheduler is very confusing. It in unclear which
resources are supposed to be protected by which locks.
* Inconsistent synchronization: there are synchronized methods, synchronized
blocks, volatile fields, and read-write locks.
* SchedulerNode: it uses synchronized methods in getters and setters which
could be replaced by atomic reads/writes. It makes more sense to use
synchronized to execute a critical section.
* Replacing synchronized with read-write locks shall increase parallelism
(assuming we prove that it is multithreaded module)
> Fine-grained SchedulerNode synchronization
> ------------------------------------------
>
> Key: YARN-9805
> URL: https://issues.apache.org/jira/browse/YARN-9805
> Project: Hadoop YARN
> Issue Type: Improvement
> Reporter: Ahmed Hussein
> Assignee: Ahmed Hussein
> Priority: Minor
> Attachments: YARN-9805.001.patch, YARN-9805.002.patch,
> YARN-9805.003.patch
>
>
> Yarn schedulerNode and RMNode are using synchronized methods on reading and
> updating the resources.
> Instead, use read-write reentrant locks to provide fine-grained locking and
> to avoid blocking concurrent reads.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]