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: [email protected]
For additional commands, e-mail: [email protected]