captainzmc commented on a change in pull request #1296:
URL: https://github.com/apache/hadoop-ozone/pull/1296#discussion_r485570651



##########
File path: 
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmVolumeArgs.java
##########
@@ -46,6 +47,7 @@
   private long quotaInBytes;
   private long quotaInCounts;
   private final OmOzoneAclMap aclMap;
+  private LongAdder quotaUsageInBytes = new LongAdder();

Review comment:
       QuotaUsageInBytes is a property of Volume that needs to be updated each 
time when CreateKey, AllocateBlock, CommitKey, DeleteKey. and at the beginning, 
we used the volume lock. 
   But, Previously, only Bucket locks were used for these operation, and use 
volume lock greatly affect the concurrency performance of different buckets 
under same volume. 
   So to avoid Volume locking for poor performance, LongAdder is used here to 
complete the atomic update of quotaUsageInBytes.
   I did a performance test with freon. Multi-threading wrote different buckets 
under the same volume, and using LongAdder had little impact on the original 
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