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

Wei-Chiu Chuang updated HDFS-11187:
-----------------------------------
    Attachment: HDFS-11187.002.patch

Posted a new patch.

In this patch, if a BlockSender sends a Finalized replica, it checks to see if 
the last partial checksum is in memory. If yes, it uses the in-memory checksum. 
Otherwise, it loads the checksum from disk. This is done outside the dataset 
lock so should eliminate most of performance issue associated with a slow/busy 
disk. 

The last partial checksum of a finalized replica is stored in-memory when a 
replica is converted from finalized/rbw/rur, since the checksum is already 
in-memory, and does not require additional disk access. There are other cases 
where a Finalized replica object is created, for example, when a DataNode 
starts. In these cases it would require additional disk access to get checksum, 
and the replica may not even be accessed at all, so it seems a "lazy" approach 
where checksum is loaded when replica is accessed makes more sense.

> Optimize disk access for last partial chunk checksum of Finalized replica
> -------------------------------------------------------------------------
>
>                 Key: HDFS-11187
>                 URL: https://issues.apache.org/jira/browse/HDFS-11187
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: datanode
>            Reporter: Wei-Chiu Chuang
>            Assignee: Wei-Chiu Chuang
>         Attachments: HDFS-11187.001.patch, HDFS-11187.002.patch
>
>
> The patch at HDFS-11160 ensures BlockSender reads the correct version of 
> metafile when there are concurrent writers.
> However, the implementation is not optimal, because it must always read the 
> last partial chunk checksum from disk while holding FsDatasetImpl lock for 
> every reader. It is possible to optimize this by keeping an up-to-date 
> version of last partial checksum in-memory and reduce disk access.
> I am separating the optimization into a new jira, because maintaining the 
> state of in-memory checksum requires a lot more work.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to