[
https://issues.apache.org/jira/browse/MAPREDUCE-1495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834030#action_12834030
]
Rajesh Balamohan commented on MAPREDUCE-1495:
---------------------------------------------
Made the following changes to reduce contentions and profiled JT. This
virtually eliminated the
contentions caused by getTaskCompletionEvents
In JobTracker.java: (locking only jobs during get())
public TaskCompletionEvent[] getTaskCompletionEvents(
JobID jobid, int fromEventId, int maxEvents) throws IOException{
JobInProgress job = null;
synchronized (jobs) {
job = this.jobs.get(jobid);
}
if (null != job) {
if (job.inited()) {
return job.getTaskCompletionEvents(fromEventId, maxEvents);
} else {
return EMPTY_EVENTS;
}
}
return completedJobStatusStore.readJobTaskCompletionEvents(jobid,
fromEventId, maxEvents);
}
In Configuration.java: (eliminated synchronize on method level. This might be
required only when properties is null)
private Properties getProps() {
if (properties == null) {
synchronized(this) {
properties = new Properties();
loadResources(properties, resources, quietmode);
if (overlay!= null) {
properties.putAll(overlay);
if (storeResource) {
for (Map.Entry<Object,Object> item: overlay.entrySet()) {
updatingResource.put((String) item.getKey(), "Unknown");
}
}
}
}
}
return properties;
}
> Reduce locking contention on JobTracker.getTaskCompletionEvents()
> -----------------------------------------------------------------
>
> Key: MAPREDUCE-1495
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-1495
> Project: Hadoop Map/Reduce
> Issue Type: Improvement
> Affects Versions: 0.20.1
> Reporter: Rajesh Balamohan
>
> While profiling JT for slow performance with small-jobs, it was observed that
> JobTracker.getTaskCompletionEvents() is attributing to 40% of lock contention
> on JT.
> This JIRA ticket is created to explore the possibilities of reducing the
> sychronized code block in this method.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.