Why is all data in tikv-write stored in levels 5 and 6?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 为什么tikv-write所有的数据都存储在在level5和6

| username: HTAP萌新

[TiDB Usage Environment] Production Environment / Testing / Poc
[TiDB Version] 5.7
[Encountered Problem] All data monitored by Grafana in the cluster is stored in levels 5 and 6. The data was batch loaded using Lightning (no update or insert operations). Is this phenomenon normal? Or is it caused by some configuration of TiKV? How can I ensure that levels 1-4 also contain data?

[Attachment]

Please provide the version information of each component, such as cdc/tikv, which can be obtained by executing cdc version/tikv-server --version.

| username: TiDBer_jYQINSnf | Original post link

After the data is compacted, it goes down. If you perform 1-4 updates, there will be data.

| username: h5n1 | Original post link

Each layer of data has a size limit, with the default lower layer being 10 times the size of the upper layer. When the limit is reached, it will compact and merge downwards. You can search for articles on “RocksDB compact” for more details.

| username: wuxiangdong | Original post link

Normally, old data will be moved to the lower levels. If you check the monitoring during the import, both level 0 and level 1 will have data.

| username: HTAP萌新 | Original post link

Will the original files be deleted immediately after compaction?

| username: HTAP萌新 | Original post link

Thank you, may I ask if the original files will be immediately deleted after compaction?

| username: Gin | Original post link

When using Lightning’s local backend to import data, it will compact the data and merge multiple small SST files into one large SST file.

| username: h5n1 | Original post link

If there are queries referencing it, delete it only after the queries are completed.

| username: OnTheRoad | Original post link

The image is not visible. Please provide the text you need translated.

| username: alfred | Original post link

Does “default up to 6 levels” limit the data size?

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.