captainzmc commented on pull request #1723:
URL: https://github.com/apache/ozone/pull/1723#issuecomment-750715216


   > @captainzmc , although we removed the volume usedBytes because of the 
quota update issue. Can we also try to sum the buckets used bytes when bucket 
is created that will be used for the volume quota check? As I see we already do 
the similar check for the quota valid check, 
[OMBucketCreateRequest.java#L331](https://github.com/apache/ozone/blob/master/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/bucket/OMBucketCreateRequest.java#L331)
   
   Thanks for @linyiqun‘ advice.
   We've considered this option before, but it can cause performance problems.
   Let's assume that we have 1000 buckets under volume.
   First set quota, which is not a very frequent action in a cluster, and 
unlike the write operation, has a low latency requirement. So we calculated 
that all bucket quota is acceptable.
   However, each write operation calculating the usedBytes of all buckets for 
volume spaceQuotaChecker may affect write performance. The more buckets there 
are, the more performance is affected per write. This maybe unacceptable to the 
users.
   And if we do this, we need to lock the volume when we count all the 
usedBytes of our buckets, because we don't want the usedBytes of our buckets to 
change back and forth when we calculate the total usedBytes, which will also 
affect the performance.


----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to