You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Ivan Andika (Jira)" <ji...@apache.org> on 2023/09/18 05:21:00 UTC

[jira] [Updated] (RATIS-1890) SegmentedRaftLogCache#shouldEvict should only iterate over closed segments once

     [ https://issues.apache.org/jira/browse/RATIS-1890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Andika updated RATIS-1890:
-------------------------------
    Attachment: profile_cpu_high_rpc_0915_ck_om3.html

> SegmentedRaftLogCache#shouldEvict should only iterate over closed segments once
> -------------------------------------------------------------------------------
>
>                 Key: RATIS-1890
>                 URL: https://issues.apache.org/jira/browse/RATIS-1890
>             Project: Ratis
>          Issue Type: Improvement
>    Affects Versions: 2.4.0, 2.4.1, 2.5.0, 2.5.1
>            Reporter: Ivan Andika
>            Priority: Minor
>             Fix For: 2.5.2
>
>         Attachments: image-2023-09-18-13-17-25-569.png, profile_cpu_high_rpc_0915_ck_om3.html
>
>
> It's observed that `SegmentedLogCache#shouldEvict` iterate over the `closedSegments` twice:
>  * `LogSegmentList#countCached`
>  * `LogSegmentList#getTotalCacheSize`
> !image-2023-09-18-13-17-25-569.png|width=302,height=198!
> We can improve this by iterating over the `closedSegments` once.



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