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

Attila Doroszlai updated HDDS-3703:
-----------------------------------
    Status: Patch Available  (was: In Progress)

> Consider avoiding file lookup calls in writeChunk hotpath
> ---------------------------------------------------------
>
>                 Key: HDDS-3703
>                 URL: https://issues.apache.org/jira/browse/HDDS-3703
>             Project: Hadoop Distributed Data Store
>          Issue Type: Improvement
>            Reporter: Rajesh Balamohan
>            Assignee: Attila Doroszlai
>            Priority: Blocker
>              Labels: Triaged, performance, pull-request-available
>         Attachments: Screenshot 2020-06-02 at 5.28.59 PM.png
>
>
> In getChunkFile internally, it invokes "verifyChunkDirExists". This causes 
> file existence checks for the directory and throws IO exception accordingly. 
> If the file is anyways going to be written, it is better to handle it later 
> and throw the same exception. This could avoid file checks for every 
> "writechunk"
> [https://github.com/apache/hadoop-ozone/blob/master/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/impl/FilePerBlockStrategy.java#L106]
>  
> File channels are cached anyways in "OpenFiles". So if we can avoid 
> "file.getAbsolutePath()", this could save memory and resolving paths. 
> [https://github.com/apache/hadoop-ozone/blob/master/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/impl/FilePerBlockStrategy.java#L118]
>  
> Also "validateChunkForOverwrite" can be optimised, as "isOverWritePermitted" 
> would be false most of the times.
>  
> !Screenshot 2020-06-02 at 5.28.59 PM.png|width=835,height=510!
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to