hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yiqun Lin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-12443) Ozone: Improve SCM block deletion throttling algorithm
Date Tue, 31 Oct 2017 14:58:00 GMT

    [ https://issues.apache.org/jira/browse/HDFS-12443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16226939#comment-16226939

Yiqun Lin commented on HDFS-12443:

Thanks for the response, [~cheersyang].
I agree with what you said. As you mentioned one key point: DelLog has no notion of DN. For
this, If we can add datanode info into delLog, then the data records seem like:

||TxID ||ContainerName||DatanodeID ||BlockList||

By this way, we should query container store for getting node info, then write this to delLog
as well. Actually this won't increase the total IO operations since {{SCMBlockDeletingService$DeletedBlockTransactionScanner#getToDeleteContainerBlocks()}}
also  do this query. I mean the following lines in {{getToDeleteContainerBlocks}} can be removed
after change:
for (DeletedBlocksTransaction tx : txs) {
          try {
            ContainerInfo info = mappingService
            // Find out the datanode where this TX is supposed to send to.
                .forEach(entry -> dnTXs.addTransaction(entry, tx));
          } catch (IOException e) {
            LOG.warn("Container {} not found, continue to process next",
                tx.getContainerName(), e);

In {{SCMBlockDeletingService}}, I plan to use the following way:

* Calculate the BlockDeleteLimitSize (The maximum container number for each node)
* Scan the entire delLog from  the beginning to end, getting blocks list info for each node.
If one node reach maximum container number, then its record will be skipped.

How do you think now, [~cheersyang]?

> Ozone: Improve SCM block deletion throttling algorithm 
> -------------------------------------------------------
>                 Key: HDFS-12443
>                 URL: https://issues.apache.org/jira/browse/HDFS-12443
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ozone, scm
>            Reporter: Weiwei Yang
>            Assignee: Yiqun Lin
>              Labels: OzonePostMerge
>         Attachments: HDFS-12443-HDFS-7240.001.patch, HDFS-12443-HDFS-7240.002.patch,
HDFS-12443-HDFS-7240.002.patch, HDFS-12443-SCM-blockdeletion-throttle.pdf
> Currently SCM scans delLog to send deletion transactions to datanode periodically, the
throttling algorithm is simple, it scans at most {{BLOCK_DELETE_TX_PER_REQUEST_LIMIT}} (by
default 50) at a time. This is non-optimal, worst case it might cache 50 TXs for 50 different
DNs so each DN will only get 1 TX to proceed in an interval, this will make the deletion slow.
An improvement to this is to make this throttling by datanode, e.g 50 TXs per datanode per

This message was sent by Atlassian JIRA

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

View raw message