Skip to content

[IOTDB-4209] Use .pst to accelerate recovery in SchemaFile mode #7995

Merged
MarcosZyk merged 19 commits intoapache:masterfrom
Cpaulyz:IOTDB-4209
Feb 13, 2023
Merged

[IOTDB-4209] Use .pst to accelerate recovery in SchemaFile mode #7995
MarcosZyk merged 19 commits intoapache:masterfrom
Cpaulyz:IOTDB-4209

Conversation

@Cpaulyz
Copy link
Copy Markdown
Contributor

@Cpaulyz Cpaulyz commented Nov 15, 2022

Description

In the original process, recovery in SchemaFile mode will overwrite the .pst file and redo all the plans in MLog.

However, it causes unnecessary additional I/O cost. Therefore, the records in the mlog can be removed after flushing the .pst file. When recovering, we only need to redo the plans in the mlog that have not been persisted into the .pst file.

Performance Test

Environment

Benchmark Config:

  • DEVICE_NUMBER=100000
  • SENSOR_NUMBER=10
  • GROUP_NUMBER=1
  • CLIENT_NUMBER=5

IoTDB Config:

  • schemaEngineMode = "Schema_File"
  • cachedMNodeSizeInSchemaFileMode = 50
  • schemaRegionConsensusProtocolClass = ConsensusFactory.SIMPLE_CONSENSUS

Do not use check point

Create timeseries ≈ 41.59 second
Recover [root.test.g_0.SchemaRegion[0]] spend: 30612 ms

Use check point

Create timeseries ≈ 41.56 second
Recover [root.test.g_0.SchemaRegion[0]] spend: 1309 ms

@Cpaulyz Cpaulyz marked this pull request as draft November 16, 2022 07:45
# Conflicts:
#	server/src/main/java/org/apache/iotdb/db/metadata/logfile/MLogDescription.java
#	server/src/main/java/org/apache/iotdb/db/metadata/logfile/MLogDescriptionWriter.java
#	server/src/main/java/org/apache/iotdb/db/metadata/schemaregion/SchemaRegionSchemaFileImpl.java
@Cpaulyz Cpaulyz marked this pull request as ready for review February 11, 2023 15:39
@MarcosZyk MarcosZyk merged commit adf55e8 into apache:master Feb 13, 2023
@Cpaulyz Cpaulyz deleted the IOTDB-4209 branch February 13, 2023 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants