pvary commented on PR #13382:
URL: https://github.com/apache/iceberg/pull/13382#issuecomment-3018282040

   > I replaced all Caffeine `maximumSize` caches with `LRUCache` in this PR. 
The only one left is `DynamicWriteResultAggregator`, which uses 
`expireAfterWrite` semantics:
   > 
   > ```java
   > this.specs =
   >     
Caffeine.newBuilder().expireAfterWrite(CACHE_EXPIRATION_DURATION).softValues().build();
   > this.outputFileFactories =
   >     
Caffeine.newBuilder().expireAfterWrite(CACHE_EXPIRATION_DURATION).softValues().build();
   > ```
   > 
   > Should we replace that with `LRUCache` as well?
   
   Before we move forward, let's take a step back and consider the size of the 
cache, and the cost of a cache miss. How many items do we need in the cache for 
the optimal operation:
   1. Is this something which is static and we can configure?
   2. Is this something which should be configured by the user and relatively 
stable for a single job?
   3. Is this something which is dependent on the workload, and increases as 
the number of tables accessed by the job increases?
   
   This one looks like number 3 to me. Also the cache access is only several 
times during a checkpoint, so the performance is less important. So for me this 
seems like better handled by caffeine, but I could be convinced.
   
   Also please revisit the pervious decisions on the cache sizes, and 
reconsider if appropriate.
   
   Thanks,
   Peter


-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to