[
https://issues.apache.org/jira/browse/HDDS-3748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17601063#comment-17601063
]
Tsz-wo Sze commented on HDDS-3748:
----------------------------------
[~weichiu], we also have HDDS-7188 for trying netty ChunkedNioFile.
> Consider reusing bytebuffer in FilePerBlockStrategy::readChunk
> --------------------------------------------------------------
>
> Key: HDDS-3748
> URL: https://issues.apache.org/jira/browse/HDDS-3748
> Project: Apache Ozone
> Issue Type: Improvement
> Reporter: Rajesh Balamohan
> Priority: Major
> Labels: performance
> Attachments: Screenshot 2020-06-08 at 10.18.03 AM.png
>
>
> [https://github.com/apache/hadoop-ozone/blob/master/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/impl/FilePerBlockStrategy.java#L148]
>
> {code:java}
> long len = info.getLen();
> long offset = info.getOffset();
> ByteBuffer data = ByteBuffer.allocate((int) len);
> ChunkUtils.readData(chunkFile, data, offset, len, volumeIOStats);
> {code}
>
> Instead of allocating buffer in every readChunk, it may be possible to reuse
> via threadLocal ByteBuffer. Sizes/Limits could be adjusted on need basis.
> This is to reduce memory pressure on DN.
> !Screenshot 2020-06-08 at 10.18.03 AM.png|width=1022,height=668!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]