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 the lock of 
Volume is usually used. 
   Previously, only Bucket locks were used for these operation, and Volume 
locks can greatly affect the concurrency performance of different buckets. 
   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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org

Reply via email to