Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IOTDB-587] New TsFile version 2 #855

Merged
merged 147 commits into from Mar 31, 2020
Merged

[IOTDB-587] New TsFile version 2 #855

merged 147 commits into from Mar 31, 2020

Conversation

HTHou
Copy link
Contributor

@HTHou HTHou commented Feb 28, 2020

The mean differences of new TsFile are as below:

  1. remove ChunkGroupMetadata

  2. Modified Schema to support same measurement names with different data types

Performance Test:

4G memory.

1 Storage group,1 device,3000 measurements,each timeseries contains 600000 data points

IoTDB configuration:

enable_parameter_adapter=false
tsfile_size_threshold=1024L
memtable_size_threshold=5010241024L

Write cost:

new_TsFile:300569ms,14.76G,184 tsfiles
master:300418ms,14.73G,184 tsfiles

Query time cost:

  1. select s1 from root.sg1.d1

new_TsFile: 1349ms
master: 2102ms

  1. select s1, s2, s3, s4, s5, s6, s7, s8, s9, s10 from root.sg1.d1

new_TsFile: 3268ms
master: 4621ms

  1. select * from root

new_TsFile: 647934ms
master: 814206ms

  1. select count(s1) from root.sg1.d1

new_TsFile: 421ms
master: 1654ms

  1. select count(s1), count(s2), count(s3), count(s4), count(s5), count(s6), count(s7), count(s8), count(s9), count(s10) from root.sg1.d1

new_TsFile: 1887ms
master: 4231ms

  1. "select count(s1), count(s2), count(s3), count(s4), count(s5), count(s6), count(s7), count(s8), count(s9), count(s10), count(s11), count(s12), count(s13), count(s14), count(s15), count(s16), count(s17), count(s18), count(s19), count(s20), count(s21), count(s22), count(s23), count(s24), count(s25), count(s26), count(s27), count(s28), count(s29), count(s30) from root.sg1.d1"

new_TsFile: 3066ms
master: 6653ms

  1. select count(*) from root

new_TsFile optimize cache: 1243ms
new_TsFile without optimize cache: 313599ms
master: 614638ms

timeseriesMetaData.setMeasurementId(path.getMeasurement());
timeseriesMetaData.setTSDataType(entry.getValue().get(0).getDataType());
timeseriesMetaData.setOffsetOfChunkMetaDataList(out.getPosition());
Statistics<?> statistics = entry.getValue().get(0).getStatistics();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repeat merge the statistics information

@@ -261,64 +264,55 @@ public void endFile(Schema schema) throws IOException {
resourceLogger.info("{} writer is closed.", file.getName());
}
canWrite = false;
chunkMetadataListMap = new TreeMap<>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why need to reapply memory here?

@qiaojialin qiaojialin marked this pull request as ready for review March 25, 2020 02:13
@sonarcloud
Copy link

sonarcloud bot commented Mar 30, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 19 Code Smells

No Coverage information No Coverage information
0.2% 0.2% Duplication

Copy link
Contributor

@JackieTien97 JackieTien97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@qiaojialin qiaojialin merged commit 8d51ce7 into master Mar 31, 2020
@qiaojialin qiaojialin changed the title New TsFile [IOTDB-587] New TsFile version 2 Apr 12, 2020
@HTHou HTHou deleted the new_TsFile branch April 29, 2020 01:14
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.

None yet

7 participants