hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arpit Agarwal (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-10804) Use separate lock for ReplicaMap
Date Tue, 27 Sep 2016 17:53:21 GMT

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

Arpit Agarwal updated HDFS-10804:
---------------------------------
    Description: 
In currently implementation, ReplicaMap takes an external lock for synchronization.

In function FsDatasetImpl#FsDatasetImpl(), the object is for synchronization is the same lock
object used by FsDatasetImpl routines.

and in private FsDatasetImpl#addVolume(), the same lock is used for synchronization as well.
{code}
ReplicaMap tempVolumeMap = new ReplicaMap(datasetLock);
{code}

We can potentially eliminate the heavyweight lock for synchronizing ReplicaMap instances.
If it's not necessary, this could reduce lock contention on the datasetLock object and improve
performance. 

Could you please give me some suggestions? Thanks a lot!

Fenghua

  was:
In currently implementation, ReplicaMap takes an external lock for synchronization.

In function FsDatasetImpl#FsDatasetImpl(), the object is for synchronization is the same lock
object used by FsDatasetImpl routines.

and in private FsDatasetImpl#addVolume(), "this" object is used for synchronization as well.
ReplicaMap tempVolumeMap = new ReplicaMap(datasetLock);

We can potentially eliminate the heavyweight lock for synchronizing ReplicaMap instances.
If it's not necessary, this could reduce lock contention on the datasetLock object and improve
performance. 

Could you please give me some suggestions? Thanks a lot!

Fenghua


> Use separate lock for ReplicaMap
> --------------------------------
>
>                 Key: HDFS-10804
>                 URL: https://issues.apache.org/jira/browse/HDFS-10804
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: hdfs
>    Affects Versions: 3.0.0-beta1
>            Reporter: Fenghua Hu
>            Assignee: Fenghua Hu
>            Priority: Minor
>         Attachments: HDFS-10804-001.patch, HDFS-10804-002.patch
>
>
> In currently implementation, ReplicaMap takes an external lock for synchronization.
> In function FsDatasetImpl#FsDatasetImpl(), the object is for synchronization is the same
lock object used by FsDatasetImpl routines.
> and in private FsDatasetImpl#addVolume(), the same lock is used for synchronization as
well.
> {code}
> ReplicaMap tempVolumeMap = new ReplicaMap(datasetLock);
> {code}
> We can potentially eliminate the heavyweight lock for synchronizing ReplicaMap instances.
If it's not necessary, this could reduce lock contention on the datasetLock object and improve
performance. 
> Could you please give me some suggestions? Thanks a lot!
> Fenghua



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message