-
Notifications
You must be signed in to change notification settings - Fork 526
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
HDDS-12373. Change calculation logic for volume reserved space #7927
base: master
Are you sure you want to change the base?
Conversation
...ainer-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/VolumeUsage.java
Outdated
Show resolved
Hide resolved
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.
Thanks @symious for the patch.
Tests run: 16, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 1.096 s <<< FAILURE! - in org.apache.hadoop.ozone.container.common.volume.TestHddsVolume
Please wait for clean CI run in fork before opening PR (or open it as draft).
...e/src/test/java/org/apache/hadoop/ozone/container/common/volume/TestReservedVolumeSpace.java
Outdated
Show resolved
Hide resolved
...e/src/test/java/org/apache/hadoop/ozone/container/common/volume/TestReservedVolumeSpace.java
Outdated
Show resolved
Hide resolved
Thanks @symious for updating the patch, LGTM. Added some other reviewers who worked on space logic previously. |
...er-service/src/test/java/org/apache/hadoop/ozone/container/common/volume/TestHddsVolume.java
Outdated
Show resolved
Hide resolved
...ainer-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/VolumeUsage.java
Outdated
Show resolved
Hide resolved
One thing I just thought about is, with this new change, if user has ever set the "hdds.datanode.dir.du.reserved" or "hdds.datanode.dir.du.reserved.percent", for those non ozone services, will be too much from reservation point of view after Ozone version upgrade. For example, If Ozone DN is co-deployed with YARN service, which need disk space for shuffle data and all other data. User may set the "hdds.datanode.dir.du.reserved.percent" to 20% or 30%. Then it will be too much for this new calculation logic. |
IMO, the reserved configuration is to make sure there are enough space left for Ozone usage, and for this goal, a 50GB space left would be enough. And Ozone should not worry about the other usages (YARN or system reserve), even Ozone spare a 20% reserve space for YARN, it's not guranteed that YARN will only use 20%. It should be more safe for Ozone to always reserve a configured space regradless of other usages. |
According to config doc, ozone/hadoop-hdds/common/src/main/resources/ozone-default.xml Lines 197 to 201 in a2c5c8e
ozone/hadoop-hdds/common/src/main/resources/ozone-default.xml Lines 224 to 231 in a2c5c8e
I agree, maybe we should consider deprecating this setting? |
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.
Thanks @symious for updating the patch, LGTM except an unused method.
So after this change, datanode disk capacity reported will exclude system reserved space.
...ainer-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/VolumeUsage.java
Outdated
Show resolved
Hide resolved
@symious , current we have
I totally agree it's a good idea. Based the current state, I would propose instead of change Also current cc @sadanand48, @vtutrinov . |
@ChenSammi Are you suggesting to use "min.free.space" instead of "dir.du.reserved"? |
Yes, I'm suggesting to use |
Disscussed with @ChenSammi , it's better to keep the logic of the "du.reserved" config, so we only change log and remove the system reserved from calculation here. @ChenSammi @adoroszlai @sadanand48 PTAL. |
@symious I've also been looking into this area and I'm planning to review this pull request soon. |
What changes were proposed in this pull request?
The current logic for "hdds.datanode.dir.du.reserved" is as follows:
which means if OtherUsed() is larger than reservedInBytes, then remainingReserved will be count to 0.
When we set a "hdds.datanode.dir.du.reserved" to 100GB, we actually want the disk to spare 100GB in case of "SPACE not enough exceptions".
But normally servers have a system level block reservation, which is 5%. So for a 10T disk, the system level reserved space is about 500GB, when we set the configuration to 100GB, the "remaningReserved" is calculated as 0, so for capacity and availabilty, reservation is not counted.
In current calculation logic ,in order to reserve a 100GB space, we need to set configuration to "600GB" (500 + 100) or "0.06" (0.05 + 0.01 for percent).
This ticket is to change the logic of the reservation calculation to have a more intuitive aspect for the users, thus no need to take care of the Other usages.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-12373
How was this patch tested?
unit test.