You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Rajesh Balamohan (Jira)" <ji...@apache.org> on 2020/06/08 04:53:00 UTC
[jira] [Created] (HDDS-3748) Consider reusing bytebuffer in
FilePerBlockStrategy::readChunk
Rajesh Balamohan created HDDS-3748:
--------------------------------------
Summary: Consider reusing bytebuffer in FilePerBlockStrategy::readChunk
Key: HDDS-3748
URL: https://issues.apache.org/jira/browse/HDDS-3748
Project: Hadoop Distributed Data Store
Issue Type: Improvement
Reporter: Rajesh Balamohan
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.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org