You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2021/06/25 12:48:22 UTC
[GitHub] [hadoop] zhuxiangyi commented on a change in pull request #3063: HDFS-16043. HDFS: Delete performance optimization
zhuxiangyi commented on a change in pull request #3063:
URL: https://github.com/apache/hadoop/pull/3063#discussion_r658737120
##########
File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
##########
@@ -3344,7 +3344,8 @@ boolean delete(String src, boolean recursive, boolean logRetryCache)
getEditLog().logSync();
logAuditEvent(ret, operationName, src);
if (toRemovedBlocks != null) {
- removeBlocks(toRemovedBlocks); // Incremental deletion of blocks
+ blockManager.getMarkedDeleteQueue().add(
+ toRemovedBlocks.getToDeleteList());
Review comment:
> Thanks for the work and sharing the flame graph, which makes it easy to validate the change.
>
> However, I am still not able to understand why the change improves delete performance. The delete op is done in two steps, step 1 acquire lock, collect blocks, release lock. step 2 acquire lock, delete blocks, release lock.
>
> The change essentially moves the step2 to another thread. IMO, this approach reduces client perceived latency, which is good. But deleting the blocks still requires holding namespace lock. Why does it avoid NN unresponsiveness?
>
> Is it because instead of releasing the lock after a specified number of blocks, it releases the lock after an absolute time. I can image the absolute time is a better metric because deleting a block does take a variable duration of time, not constant.
>
> A few minor comments changes requested:
Thanks for your comment, as you have commented, the current modification is just to delete the block asynchronously. The QuotaCount calculation optimization described in jira can reduce the time to collect blocks. I plan to open a new problem to solve it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org