Tian Jiang created IOTDB-5793:
---------------------------------
Summary: Configuring the initial size of PublicBaos in PageWriter
Key: IOTDB-5793
URL: https://issues.apache.org/jira/browse/IOTDB-5793
Project: Apache IoTDB
Issue Type: Improvement
Components: Core/Engine
Reporter: Tian Jiang
Fix For: master branch
A PageWriter uses two PublicBaos to buffer the encoding results of timestamps
and values. However, the initial size of PublicBaos is the default (64B).
Consequently, if the page is large, the PublicBaos will extend several times
and each involves a full memory copy, which can be time-consuming.
To avoid unnecessary memory copy, the initial size of PublicBaos should be
configurable. There are many ways to configure the value, and here are two
alternatives:
1. Use half of the maximum page size as the initial size.
2. Record the (average) page size of the last flush in a context, and pass it
down to PageWriter in the next flush.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)