-
Notifications
You must be signed in to change notification settings - Fork 593
HDDS-9842. Cache volume capacity and available space #6383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
jojochuang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good also (see #6381)
xichen01
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adoroszlai Thanks for your work on this!
Cache the capacity and available does reduce the system call when writing file. especially in small file scenario. but for some scenario such as shared disks with other service. it may result the Container can not be recognized as a full Container.
So, this a trade-off between performance and correctness.
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/fs/CachingSpaceUsageSource.java
Show resolved
Hide resolved
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/fs/CachingSpaceUsageSource.java
Show resolved
Hide resolved
|
LGTM+1. |
smengcl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. Thanks @adoroszlai
|
Thanks @jojochuang, @smengcl, @xichen01 for the review. |
What changes were proposed in this pull request?
Currently
CachingSpaceUsageSourceonly cachesusedSpace, since that piece of information is most expensive to collect when usingdu.This patch changes the class to also cache
capacityandavailable.https://issues.apache.org/jira/browse/HDDS-9842
How was this patch tested?
Updated unit test.
CI:
https://github.com/adoroszlai/ozone/actions/runs/8294068655