You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "Yuan Tian (Jira)" <ji...@apache.org> on 2021/12/03 08:46:00 UTC

[jira] [Created] (IOTDB-2104) Using netty buffer pool to replace the ByteBuffer in reading

Yuan Tian created IOTDB-2104:
--------------------------------

             Summary: Using netty buffer pool to replace the ByteBuffer in reading
                 Key: IOTDB-2104
                 URL: https://issues.apache.org/jira/browse/IOTDB-2104
             Project: Apache IoTDB
          Issue Type: Improvement
          Components: Core/Query
            Reporter: Yuan Tian
            Assignee: Alima777


Currently, we use FileChannel in reading data from disk. However, the implementation of FileChannel in Java will first copy data from disk to cache buffer of OS and then copy data from cache buffer to DirectByteBuffer, finally copy data from DirectByteBuffer to ByteBuffer we need. To avoid creating new DirectByteBuffer each time, Java cache some DirectByteBuffer for each thread which may cause OOM in some cases.

To reduce the copy numbers and control the memory footprint of DirectByteBuffer used in query, we can use netty buffer pool to replace the ByteBuffer in reading.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)