Hi,

Param seq_memtable_flush_check_interval_in_ms and 
unseq_memtable_flush_check_interval_in_ms aim to make timed flush memtable 
configuration more flexible. If users don't have this requirement, i will merge 
both params into one param memtable_flush_check_interval_in_ms.


Thanks,
??????????????????????????????????
Haiming Zhu



 




------------------ ???????? ------------------
??????:                                                                         
                                               "dev"                            
                                                        
<hhao...@outlook.com&gt;;
????????:&nbsp;2021??8??19??(??????) ????11:05
??????:&nbsp;"dev-iotdb"<dev@iotdb.apache.org&gt;;

????:&nbsp;Re: Timed flush memtable and timed close TsFileProcessor



Hi,

I think the param number 3 and number 6 can be merged into one parameter.
The checking interval can be the same value for both sequence and unsequence 
memtables.
I don??t think any users will try to set different value for them. 

How do you think?

Thanks,
Haonan Hou

&gt; On Aug 19, 2021, at 6:04 PM, Jialin Qiao <qiaojia...@apache.org&gt; wrote:
&gt; 
&gt; Hi,
&gt; 
&gt;&gt; I am confused whether to open timed flush seq/unseq memtable and timed
&gt; close TsFileProcessor by default, because they can save memory in some user
&gt; cases while they just waste cpu in other user cases.
&gt; 
&gt; It could be enabled by default, both seq and unseq.
&gt; The 12 hours for memtable flush interval and close file interval is fine.
&gt; If it really kept 12 hours in memory, the CPU load should be very low, no
&gt; need to worry.
&gt; 
&gt; Thanks,
&gt; ??????????????????????????????????
&gt; Jialin Qiao
&gt; School of Software, Tsinghua University
&gt; 
&gt; ??????
&gt; ???????? ????????
&gt; 
&gt; 
&gt; Haiming Zhu <zhuh...@qq.com.invalid&gt; ??2021??8??19?????? ????4:37??????
&gt; 
&gt;&gt; Hi,
&gt;&gt; 
&gt;&gt; 
&gt;&gt; I have already implemented both issues [1][2].
&gt;&gt; 
&gt;&gt; 
&gt;&gt; Timed flush memtable [3] is used to flush inactive memtables 
periodically
&gt;&gt; according to their created time. For example, if we set
&gt;&gt; seq_memtable_flush_interval_in_ms to 1000, memtable A, created at time
&gt;&gt; 2000, can be flushed after time 3000.
&gt;&gt; 
&gt;&gt; 
&gt;&gt; Timed close TsFileProcessor [4] is used to close inactive 
TsFileProcessors
&gt;&gt; periodically according to how long they don't process write 
operations. For
&gt;&gt; example, if we set close_tsfile_interval_after_flushing_in_ms to 1000,
&gt;&gt; TsFileProcessor A, whose last workMemtable was flush at time 2000 and
&gt;&gt; current workMemtable is null (i.e., no more wirite operations after 
last
&gt;&gt; flush), can be closed after time 3000.
&gt;&gt; 
&gt;&gt; 
&gt;&gt; But, i am confused whether to open timed flush seq/unseq memtable and
&gt;&gt; timed close TsFileProcessor by default, because they can save memory in
&gt;&gt; some user cases while they just waste cpu in other user cases.
&gt;&gt; 
&gt;&gt; 
&gt;&gt; Look forward to your reply.
&gt;&gt; 
&gt;&gt; 
&gt;&gt; [1]&amp;nbsp;https://github.com/apache/iotdb/pull/3776
&gt;&gt; [2]&amp;nbsp;https://github.com/apache/iotdb/pull/3777
&gt;&gt; 
&gt;&gt; 
[3]&amp;nbsp;https://issues.apache.org/jira/projects/IOTDB/issues/IOTDB-1496
&gt;&gt; 
[4]&amp;nbsp;https://issues.apache.org/jira/projects/IOTDB/issues/IOTDB-1569
&gt;&gt; 
&gt;&gt; 
&gt;&gt; Thanks,
&gt;&gt; ??????????????????????????????????
&gt;&gt; Haiming Zhu
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; ------------------&amp;nbsp;????????&amp;nbsp;------------------
&gt;&gt; ??????:
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 "dev"
&gt;&gt; 
&gt;&gt; <zhuh...@qq.com.INVALID&amp;gt;;
&gt;&gt; ????????:&amp;nbsp;2021??8??16??(??????) ????5:18
&gt;&gt; ??????:&amp;nbsp;"IoTDB????????"<dev@iotdb.apache.org&amp;gt;;
&gt;&gt; 
&gt;&gt; ????:&amp;nbsp;Timed flush memtable and timed close TsFileProcessor
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; Hi,
&gt;&gt; 
&gt;&gt; 
&gt;&gt; If we open a TsFileProcessor and then never write to it, this
&gt;&gt; TsFileProcessor will become a zombie because nothing can trigger a 
flush or
&gt;&gt; close operation. So, i am implementing timed flush memtable [1] and 
timed
&gt;&gt; close TsFileProcessor [2]. Timed flush memtable is used to flush 
inactive
&gt;&gt; memtables periodically according to their created time. Timed close
&gt;&gt; TsFileProcessor is used to close inactive
&gt;&gt; TsFileProcessors&amp;amp;nbsp;periodically according to how long they 
don't
&gt;&gt; process write operations.
&gt;&gt; 
&gt;&gt; 
&gt;&gt; I add 9 params to control above two functions, and these 9 params all 
can
&gt;&gt; be hot loaded by 'load configuration' command.
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 1. enable_timed_flush_seq_memtable: whether to timed flush sequence
&gt;&gt; tsfiles' memtables.
&gt;&gt; 2. seq_memtable_flush_interval_in_ms: when a sequence memTable's 
created
&gt;&gt; time is older than current time minus this, the memtable is flushed to 
disk.
&gt;&gt; 3. seq_memtable_flush_check_interval_in_ms: the interval to check 
whether
&gt;&gt; the sequence&amp;amp;nbsp;memtables need flushing.
&gt;&gt; 4. enable_timed_flush_unseq_memtable: whether to timed flush unsequence
&gt;&gt; tsfiles' memtables.
&gt;&gt; 5. unseq_memtable_flush_interval_in_ms: when an unsequence memTable's
&gt;&gt; created time is older than current time minus this, the memtable is 
flushed
&gt;&gt; to disk.
&gt;&gt; 6. unseq_memtable_flush_check_interval_in_ms: the interval to check
&gt;&gt; whether the unsequence&amp;amp;nbsp;memtables need flushing.
&gt;&gt; 7. enable_timed_close_tsfile: whether to timed close TsfileProcessors.
&gt;&gt; 8.&amp;amp;nbsp;close_tsfile_interval_after_flushing_in_ms: when
&gt;&gt; TsfileProcessor's last working memtable flush time is older than 
current
&gt;&gt; time minus this and its working memtable is null, this TsfileProcessor 
will
&gt;&gt; be closed.
&gt;&gt; 9.&amp;amp;nbsp;close_tsfile_check_interval_in_ms: the interval to 
check
&gt;&gt; whether the TsfileProcessors&amp;amp;nbsp;need closing.
&gt;&gt; 
&gt;&gt; 
&gt;&gt; What do you think?
&gt;&gt; 
&gt;&gt; 
&gt;&gt; [1]&amp;amp;nbsp;
&gt;&gt; https://issues.apache.org/jira/projects/IOTDB/issues/IOTDB-1496
&gt;&gt; [2] https://issues.apache.org/jira/projects/IOTDB/issues/IOTDB-1569
&gt;&gt; 
&gt;&gt; 
&gt;&gt; Thanks,
&gt;&gt; ??????????????????????????????????
&gt;&gt; Haiming Zhu
&gt;

Reply via email to