You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR has two benifits:
1、improve datanode's throughout when using faster disk like SSD.
2、improve datanode's throughout when datanode has large disk capacity, this PR can mitigate volume lock contention when ioutil is consistently high.
We used NvmeSSD as volumes in datanodes and performed some stress tests.
We found that NvmeSSD and HDD disks achieve similar performance when create lots of small files, such as 10KB.
This phenomenon is counterintuitive. After analyzing the metric monitoring , we found that fsdataset lock became the bottleneck in high concurrency scenario.
Currently, we have two level locks which are BLOCK_POOL and VOLUME. We can further split the volume lock to DIR lock.
DIR lock is defined as below: given a blockid, we can determine which subdir this block will be placed in finalized dir. We just use subdir[0-31]/subdir[0-31] as the name of DIR lock.
More details, please refer to method DatanodeUtil#idToBlockDir:
@hfutatzhanghb Hello.Sir. Although I am very excited about this PR, I would like to ask why we don't split the lock granularity into INode level?
@BsoBird Sir, thanks for noticing this PR. This PR aims to reduce the two-level dataset lock competition furtherly, it is inside datanode, we do not know hdfs filesystem inode information here. Hope to receive your response~
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
Refer to HDFS-17496.
This PR has two benifits:
1、improve datanode's throughout when using faster disk like SSD.
2、improve datanode's throughout when datanode has large disk capacity, this PR can mitigate volume lock contention when ioutil is consistently high.
We used NvmeSSD as volumes in datanodes and performed some stress tests.
We found that NvmeSSD and HDD disks achieve similar performance when create lots of small files, such as 10KB.
This phenomenon is counterintuitive. After analyzing the metric monitoring , we found that fsdataset lock became the bottleneck in high concurrency scenario.
Currently, we have two level locks which are BLOCK_POOL and VOLUME. We can further split the volume lock to DIR lock.
DIR lock is defined as below: given a blockid, we can determine which subdir this block will be placed in finalized dir. We just use subdir[0-31]/subdir[0-31] as the name of DIR lock.
More details, please refer to method DatanodeUtil#idToBlockDir:
The performance comparison is as below:
experimental setup:
3 DataNodes with single disk.
10 Cients concurrent write and delete files after writing.
550 threads per Client.
specially, evictBlocks, onCompleteLazyPersist, updateReplicaUnderRecovery we don't modify.