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

Attila Doroszlai commented on HDDS-2382:
----------------------------------------

[~arp], yes, [both 
layouts|https://github.com/apache/hadoop-ozone/blob/3ab76ce59d529aa4f468a72eb7aec187cb01a0bd/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/ChunkLayOutVersion.java#L124-L125]
 perform the same [chunk dir 
check|https://github.com/apache/hadoop-ozone/blob/3ab76ce59d529aa4f468a72eb7aec187cb01a0bd/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/ChunkLayOutVersion.java#L133-L150].

> Consider reducing number of file::exists() calls during write operation
> -----------------------------------------------------------------------
>
>                 Key: HDDS-2382
>                 URL: https://issues.apache.org/jira/browse/HDDS-2382
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>          Components: Ozone Datanode
>            Reporter: Rajesh Balamohan
>            Assignee: Attila Doroszlai
>            Priority: Major
>              Labels: TriagePending, performance
>
> When writing 100-200 MB files with multiple threads, observed lots of 
> {{[file::exists(])}} checks.
> For every 16 MB chunk, it ends up checking whether {{chunksLoc}} directory 
> exists or not. (ref: 
> [https://github.com/apache/hadoop-ozone/blob/master/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/helpers/ChunkUtils.java#L239])
> Also, this check ({{ChunkUtils.getChunkFile}}) happens from 2 places.
> 1.org.apache.hadoop.ozone.container.common.transport.server.ratis.ContainerStateMachine.lambda$handleWriteChunk
> 2.org.apache.hadoop.ozone.container.common.transport.server.ratis.ContainerStateMachine.lambda$applyTransaction
> Note that these are folders and not actual chunk filenames. It would be 
> helpful to reduce this check, if we track create/delete of these folders.



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

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

Reply via email to