hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kihwal Lee (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-4183) Throttle block recovery
Date Wed, 14 Nov 2012 02:22:12 GMT

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

Kihwal Lee commented on HDFS-4183:

bq. Could we simply jitter the lease expiration time? The 1 hour limit isn't anything precise
which a user would depend on. I could see adding a 10% jitter to smooth out the expirations
over time.

If it is a short burst, jitter will scatter the burst. But if it's a long burst, this won't
help much. In some cases, over 40K block recoveries were still outstanding after an hour and
caused the leases held by namenode during recovery to expire, resulting in yet another storm
of block recoveries.

bq. Any idea why it's so slow aside from the logging? Do we have a silly bug where we are
logSyncing while holding the lock or something?

I couldn't find anything in commitBlockSynchronization(), but releasing lease and initiating
block recover may be the source of problem.

internalReleaseLease() : this is called from the lease monitor with the write lock held 
  -> reassignLease()
    -> logReassignLease() : reacquires the write lock and logSync() happens.

So it looks like logSync() is done holding the write lock during lease release & scheduling
block recovery.

We should probably hold off this jira and fix that first.
> Throttle block recovery
> -----------------------
>                 Key: HDFS-4183
>                 URL: https://issues.apache.org/jira/browse/HDFS-4183
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: name-node
>    Affects Versions: 0.23.4, 2.0.2-alpha
>            Reporter: Kihwal Lee
>            Assignee: Kihwal Lee
>            Priority: Critical
> When a large number of files are abandoned without closing, a storm of lease expiration
follows in about an hour (lease hard limit). For the last block of each file, block recovery
is initiated and when the datanode is done, it calls commitBlockSynchronization() is called
against namenode. A burst of these calls can slow down namenode considerably. We need to throttle
block recovery and/or speed up the rate at which commitBlockSynchronization() is served.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message