rich7420 commented on PR #11151:
URL: https://github.com/apache/ozone/pull/11151#issuecomment-5461217322

   Quick JMH of a page-cache-hot `ReadChunk` (open + read) with the per-op 
`getChunkDir` stat (old) vs the cached dir (new), JDK 21 / macOS (5 forks x 5, 
n=25):
   
   ```
     chunk    old        new       saved
      4KB     11.2 us    9.35 us   1.85 us  (~16%)
      1MB     36.0 us    33.7 us   2.26 us  (~6%)
   ```
   
   The removed work is ~one stat plus a `File` allocation (~2 us, roughly 
constant), so it is a meaningful fraction for small cached reads and shrinks as 
the read grows. On the read path the stat is pure added work (the read 
otherwise goes straight to open()). No fsync in this run, and macOS stat is 
pricier than Linux, so the fraction is an upper bound. Standalone JMH, not part 
of the PR.
   


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