[ 
https://issues.apache.org/jira/browse/HDDS-12563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17934581#comment-17934581
 ] 

Tsz-wo Sze edited comment on HDDS-12563 at 3/14/25 6:58 PM:
------------------------------------------------------------

We tried to use guava Cache for Ratis TermIndex but the performance was bad; 
see RATIS-2099 and RATIS-2132.

So, we might have to implement a [time-aware LRU 
cache|https://en.wikipedia.org/wiki/Cache_replacement_policies#Time-aware,_least-recently_used].
  Indeed, we probably only need to enforce cache entry lifetime but not the 
cache size, i.e. evicting an entry only if it has expired.


was (Author: szetszwo):
We tried to use guava Cache for Ratis TermIndex but the performance was bad; 
see RATIS-2099 and RATIS-2132.

So, we might have to implement a [time-aware LRU 
cache||https://en.wikipedia.org/wiki/Cache_replacement_policies#Time-aware,_least-recently_used].
  Indeed, we probably only need to enforce cache entry lifetime but not the 
cache size, i.e. evicting an entry only if it has expired.

> Cache and reuse ContainerID object
> ----------------------------------
>
>                 Key: HDDS-12563
>                 URL: https://issues.apache.org/jira/browse/HDDS-12563
>             Project: Apache Ozone
>          Issue Type: Bug
>          Components: SCM
>            Reporter: Nandakumar
>            Assignee: Nandakumar
>            Priority: Major
>
> Since {{ContainerID}} is immutable and all the Container IDs are kept in 
> SCM's memory, we can cache and reuse the {{ContainerID}} object
> This will avoid re-calculation of {{hash}} and {{proto}} conversion and also 
> help (though very little) with SCM's memory consumption.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to