Hi,

OK??I will do not use any rich-format


>Suppose the parameter is 5. Then in level 2, will you merge 4 new VM files
>to the bigger one, or merge 5 VM files?
I will merge 5 VM files to a bigger one in level 2.





------------------ ???????? ------------------
??????:                                                                         
                                               "dev"                            
                                                        <saint...@gmail.com&gt;;
????????:&nbsp;2020??7??20??(??????) ????4:03
??????:&nbsp;"dev"<dev@iotdb.apache.org&gt;;

????:&nbsp;Re: add vm(hot compaction) in tsfile processor



Hi Lingzhe,

Suggest you give up your email client...

Or, do not use any rich-format in the mailing list.

Best,
-----------------------------------
Xiangdong Huang
School of Software, Tsinghua University

&nbsp;??????
???????? ????????


445073309 <sure...@foxmail.com&gt; ??2020??7??20?????? ????3:47??????

&gt; Hi,
&gt;
&gt;
&gt; I convert figure to symbolic..
&gt; &amp;gt; * when we flush 5(max_vm_num) times, the current level will do
&gt; compaction
&gt; &amp;gt; to the next level
&gt; 1 1 1 1 1
&gt; |&amp;nbsp; / / / /
&gt; 5
&gt; &amp;gt; * when we flush all 11 times, the compaction procedure is
&gt; 1 1 1 1 1&amp;nbsp; &amp;nbsp;1 1 1 1 1&amp;nbsp; &amp;nbsp;1
&gt; |&amp;nbsp; / / / /&amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; / / / /
&gt; 5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&amp;nbsp; &amp;nbsp;5
&gt; &amp;gt; * if we close the tsfile, the whole compaction procedure will be
&gt; 1 1 1 1 1&amp;nbsp; &amp;nbsp;1 1 1 1 1&amp;nbsp; &amp;nbsp;1
&gt; |&amp;nbsp; / / / /&amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; / / / 
/&amp;nbsp; &amp;nbsp; /
&gt; 5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&amp;nbsp; &amp;nbsp;5&amp;nbsp; &amp;nbsp;
&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/
&gt;
&gt; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&amp;nbsp; &amp;nbsp; /&amp;nbsp; &amp;nbsp;
&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/
&gt; 11
&gt;
&gt;
&gt; &amp;gt; Suppose the parameter is 5. Then in level 2, will you merge 4 new 
VM
&gt; files
&gt; &amp;gt; to the bigger one, or merge 5 VM files?
&gt; I will merge 5 VM files to a bigger one&amp;nbsp;in level 2.
&gt;
&gt;
&gt; -----------------------------------
&gt; Lingzhe Zhang
&gt; School of Software, Tsinghua University
&gt;
&gt; ??????
&gt; ???????? ????????
&gt; ------------------&amp;nbsp;????????&amp;nbsp;------------------
&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;&nbsp;
 "dev"
&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 <
&gt; saint...@gmail.com&amp;gt;;
&gt; ????????:&amp;nbsp;2020??7??20??(??????) ????3:39
&gt; ??????:&amp;nbsp;"dev"<dev@iotdb.apache.org&amp;gt;;
&gt;
&gt; ????:&amp;nbsp;Re: add vm(hot compaction) in tsfile processor
&gt;
&gt;
&gt;
&gt; Hi,
&gt;
&gt; Did you attach some figures? The mailing list does not allow figures..
&gt;
&gt; Suppose the parameter is 5. Then in level 2, will you merge 4 new VM files
&gt; to the bigger one, or merge 5 VM files?
&gt;
&gt; Best,
&gt; -----------------------------------
&gt; Xiangdong Huang
&gt; School of Software, Tsinghua University
&gt;
&gt; &amp;nbsp;??????
&gt; ???????? ????????
&gt;
&gt;
&gt; 445073309 <sure...@foxmail.com&amp;gt; ??2020??7??20?????? ????3:31??????
&gt;
&gt; &amp;gt; Hi,
&gt; &amp;gt;
&gt; &amp;gt; max_vm_num means that the most number of vm files relation to a
&gt; tsfile's
&gt; &amp;gt; level.
&gt; &amp;gt; for example, we set max_vm_num=5 and we flush 11 times, then the
&gt; &amp;gt; compaction procedure can be described as below:
&gt; &amp;gt; * when we flush 5(max_vm_num) times, the current level will do
&gt; compaction
&gt; &amp;gt; to the next level
&gt; &amp;gt; * when we flush all 11 times, the compaction procedure is
&gt; &amp;gt; * if we close the tsfile, the whole compaction procedure will be
&gt; &amp;gt;
&gt; &amp;gt;
&gt; &amp;gt; And we set default max_vm_num=5 in current version, if user do not
&gt; know
&gt; &amp;gt; which value is suitable, just use the default value is enough to 
make
&gt; chunk
&gt; &amp;gt; larger.
&gt; &amp;gt; Best,
&gt; &amp;gt; -----------------------------------
&gt; &amp;gt; Lingzhe Zhang
&gt; &amp;gt; School of Software, Tsinghua University
&gt; &amp;gt;
&gt; &amp;gt; ??????
&gt; &amp;gt; ???????? ????????
&gt; &amp;gt;
&gt; &amp;gt;
&gt; &amp;gt; ------------------ ???????? ------------------
&gt; &amp;gt; *??????:* "dev" <saint...@gmail.com&amp;gt;;
&gt; &amp;gt; *????????:* 2020??7??20??(??????) ????3:10
&gt; &amp;gt; *??????:* "dev"<dev@iotdb.apache.org&amp;gt;;
&gt; &amp;gt; *????:* Re: add vm(hot compaction) in tsfile processor
&gt; &amp;gt;
&gt; &amp;gt; Hi Lingzhe,
&gt; &amp;gt;
&gt; &amp;gt; &amp;gt;max_vm_num: indicates that a TsFileProcessor has at most 
the
&gt; number of
&gt; &amp;gt; virtual memory files
&gt; &amp;gt;
&gt; &amp;gt; what does this mean? and how do I know what value is suitable? 
(For
&gt; &amp;gt; example, if I set it as 1, is there any impact?)
&gt; &amp;gt;
&gt; &amp;gt; Best,
&gt; &amp;gt; -----------------------------------
&gt; &amp;gt; Xiangdong Huang
&gt; &amp;gt; School of Software, Tsinghua University
&gt; &amp;gt;
&gt; &amp;gt;&amp;nbsp; ??????
&gt; &amp;gt; ???????? ????????
&gt; &amp;gt;
&gt; &amp;gt;
&gt; &amp;gt; 445073309 <sure...@foxmail.com&amp;gt; ??2020??7??20?????? 
????12:42??????
&gt; &amp;gt;
&gt; &amp;gt; &amp;gt; Hi,
&gt; &amp;gt; &amp;gt;
&gt; &amp;gt; &amp;gt;
&gt; &amp;gt; &amp;gt; I met a problem that iotdb will write small chunk data 
when lack
&gt; of
&gt; &amp;gt; &amp;gt; memtable num, this causes the system to query hot data 
more
&gt; slowly.
&gt; &amp;gt; &amp;gt;
&gt; &amp;gt; &amp;gt;
&gt; &amp;gt; &amp;gt; So I create a new type of file -- vm file, and use it to 
do hot
&gt; &amp;gt; compaction
&gt; &amp;gt; &amp;gt; in flush processor. With this, we can flexiblily 
controll the
&gt; size of
&gt; &amp;gt; each
&gt; &amp;gt; &amp;gt; chunk. The configuration and usage changes will be 
described as
&gt; follows:
&gt; &amp;gt; &amp;gt; * add a new parameter enable_vm in 
iotdb-engine.properties:
&gt; indicates
&gt; &amp;gt; &amp;gt; whether to use virtual memory
&gt; &amp;gt; &amp;gt; * use parameter avg_series_point_number_threshold in
&gt; &amp;gt; iotdb-engine.properties:
&gt; &amp;gt; &amp;gt; indicates the minimum average number of chunk data 
points after
&gt; hot
&gt; &amp;gt; &amp;gt; compaction
&gt; &amp;gt; &amp;gt; * add a new parameter max_vm_num in 
iotdb-engine.properties:
&gt; &amp;gt; &amp;gt; indicates that a TsFileProcessor has at most the number 
of
&gt; virtual memory
&gt; &amp;gt; &amp;gt; files
&gt; &amp;gt; &amp;gt; * add a new parameter max_merge_chunk_num_in_tsfile in
&gt; &amp;gt; iotdb-engine.properties:
&gt; &amp;gt; &amp;gt; indicates the vm files max merge times
&gt; &amp;gt; &amp;gt; * the suffix of the vm file is'.vm', and the naming 
convention is
&gt; &amp;gt; &amp;gt; {tsfile_name}-{level}-{timestamp}.vm
&gt; &amp;gt; &amp;gt;
&gt; &amp;gt; &amp;gt; And there are many detail changes like:
&gt; &amp;gt; &amp;gt; * set virtual memory file list 
List<List<TsFileResource&amp;gt;&amp;gt;
&gt; &amp;gt; &amp;gt; vmTsFileResources for each TsFileProcessor, add
&gt; &amp;gt; &amp;gt; List<List<RestorableTsFileIOWriter&amp;gt;&amp;gt; 
vmWriters for
&gt; management
&gt; &amp;gt; &amp;gt; * in the recover process, the recovery of the vm file is 
newly
&gt; added, and
&gt; &amp;gt; &amp;gt; the corresponding TsFileProcessor is injected after the 
recovery
&gt; &amp;gt; &amp;gt;
&gt; &amp;gt; &amp;gt; The compaction strategy is now writen like
&gt; LeveledCompactionStrategy in
&gt; &amp;gt; Cassandra,
&gt; &amp;gt; &amp;gt; and it can be optimized later.
&gt; &amp;gt; &amp;gt;
&gt; &amp;gt; &amp;gt; I put the detail zh-doc in the attachment.
&gt; &amp;gt; &amp;gt;
&gt; &amp;gt; &amp;gt; Thanks,
&gt; &amp;gt; &amp;gt; --
&gt; &amp;gt; &amp;gt; Lingzhe Zhang
&gt; &amp;gt; &amp;gt; School of Software, Tsinghua University
&gt; &amp;gt; &amp;gt;
&gt; &amp;gt; &amp;gt; ??????
&gt; &amp;gt; &amp;gt; ???????? ????????
&gt; &amp;gt; &amp;gt;
&gt; &amp;gt;
&gt; &amp;gt;

Reply via email to