[
https://issues.apache.org/jira/browse/IOTDB-5793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17713863#comment-17713863
]
Jialin Qiao commented on IOTDB-5793:
------------------------------------
I prefer 2, we could record this in storage group levelĀ
> 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
> Priority: Major
> Labels: PageWriter, memory
> 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)