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

Duong updated HDDS-9297:
------------------------
    Attachment: om-flamegraph-lockstripping.html

> getKeyInfo re-read bucket/volume info multiple times
> ----------------------------------------------------
>
>                 Key: HDDS-9297
>                 URL: https://issues.apache.org/jira/browse/HDDS-9297
>             Project: Apache Ozone
>          Issue Type: Improvement
>          Components: Ozone Manager
>    Affects Versions: 1.4.0
>            Reporter: Duong
>            Priority: Major
>              Labels: performance
>         Attachments: om-flamegraph-lockstripping.html
>
>
> OM's getKeyInfo API internally does the following steps:
> 1. Resolve bucket link: confirms that bucket/volume exists, resolve the 
> bucket's real name if the bucket param points to a soft link. 
> 2. ACL check: check if the user has access to the requested resource.
> 3. Read key metadata from rocks db.
> 4. Get block container location cache/SCM.
> 5. Generate block token for read.
> Although during (1), bucket/volume info is already retrieved from db/cache, 
> step (2) and (3) still re-read the same information to extract different 
> sub-attribute. e.g. (2) needs to read bucket/volume to get bucket/volume 
> owner name, (3) needs to get bucket layout.
> Those redundant reads unnecessarily add a significant cost to the cost of 
> API, given that each read involves locking, encoding/decoding results...
> We can simply populate all the needed information, e.g. bucket/volume owner, 
> and bucket layout, in the first step and reuse them across the remaining 
> steps. 



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