xichen01 commented on PR #5388:
URL: https://github.com/apache/ozone/pull/5388#issuecomment-1748725571

   > Thanks @xichen01 for the improvement, The current patch LGTM. Although 
adding this to CachingResource might make sense too and might further improve 
performance. With this patch we only make one system call for getCapacity per 
writeChunk. If we add it to CachingSpaceUsageResource then it can only make one 
system call when initially the DN loads the volume info into memory. The 
refresh mechanism should not do anything as capacity doesn't change. With this 
, there will be only one call for a volume.getCapacity() after DN starts up. 
Does it make sense?
   
   
   > The refresh mechanism should not do anything as capacity doesn't change
   
   This is not guaranteed. In some scenarios, it is possible to change the 
capacity, e.g. in K8S environments, lvm partitions, or manually change the 
partition size(`resize2fs`, `xfs_growfs`, ... ), but this is not a frequent 
scenario. 
   So whether we can cache capacity at startup depends on whether we want to 
ensure that the `capacity` of the above scenario is normal or not


-- 
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.

To unsubscribe, e-mail: [email protected]

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