You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/07/15 09:59:42 UTC

[GitHub] [iotdb] lyssom opened a new pull request, #6599: [IOTDB-2569]Support ZSTD Compression

lyssom opened a new pull request, #6599:
URL: https://github.com/apache/iotdb/pull/6599

   ## Description
   https://issues.apache.org/jira/browse/IOTDB-2569
   
   ZSTD is a new compression method published by Facebook.
   https://github.com/facebook/zstd
   
   use pure java ZSTD: https://github.com/luben/zstd-jni
   The compression ratio is about 0.83
   
   Eg: IoTDB > CREATE TIMESERIES root.ln.wf01.wt01.temperature WITH DATATYPE=FLOAT, ENCODING=RLE, COMPRESSOR=ZSTD
   
   ### Content1 ...
   
   ### Content2 ...
   
   ### Content3 ...
   
   <!--
   In each section, please describe design decisions made, including:
    - Choice of algorithms
    - Behavioral aspects. What configuration values are acceptable? How are corner cases and error 
       conditions handled, such as when there are insufficient resources?
    - Class organization and design (how the logic is split between classes, inheritance, composition, 
       design patterns)
    - Method organization and design (how the logic is split between methods, parameters and return types)
    - Naming (class, method, API, configuration, HTTP endpoint, names of emitted metrics)
   -->
   
   
   <!-- It's good to describe an alternative design (or mention an alternative name) for every design 
   (or naming) decision point and compare the alternatives with the designs that you've implemented 
   (or the names you've chosen) to highlight the advantages of the chosen designs and names. -->
   
   <!-- If there was a discussion of the design of the feature implemented in this PR elsewhere 
   (e. g. a "Proposal" issue, any other issue, or a thread in the development mailing list), 
   link to that discussion from this PR description and explain what have changed in your final design 
   compared to your original proposal or the consensus version in the end of the discussion. 
   If something hasn't changed since the original discussion, you can omit a detailed discussion of 
   those aspects of the design here, perhaps apart from brief mentioning for the sake of readability 
   of this PR description. -->
   
   <!-- Some of the aspects mentioned above may be omitted for simple and small changes. -->
   
   <hr>
   
   This PR has:
   - [ ] been self-reviewed.
       - [ ] concurrent read
       - [ ] concurrent write
       - [ ] concurrent read and write 
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] added Javadocs for most classes and all non-trivial methods. 
   - [ ] added or updated version, __license__, or notice information
   - [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious 
     for an unfamiliar reader.
   - [ ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold 
     for code coverage.
   - [ ] added integration tests.
   - [ ] been tested in a test IoTDB cluster.
   
   <!-- Check the items by putting "x" in the brackets for the done things. Not all of these items 
   apply to every PR. Remove the items which are not done or not relevant to the PR. None of the items 
   from the checklist above are strictly necessary, but it would be very helpful if you at least 
   self-review the PR. -->
   
   <hr>
   
   ##### Key changed/added classes (or packages if there are too many classes) in this PR
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] HTHou commented on a diff in pull request #6599: [IOTDB-2569]Support ZSTD Compression

Posted by GitBox <gi...@apache.org>.
HTHou commented on code in PR #6599:
URL: https://github.com/apache/iotdb/pull/6599#discussion_r917511824


##########
LICENSE-binary:
##########
@@ -278,6 +277,7 @@ BSD 3-Clause
 org.antlr:antlr-runtime:4.8-1
 org.ow2.asm:asm:5.0.4
 org.jline:jline:3.21.0
+com.github.luben.zstd-jni:1.3.2-6

Review Comment:
   Hi, I checked https://github.com/luben/zstd-jni#license and find out this package is actually under BSD 2-Clause license. 
   
   https://github.com/luben/zstd-jni/blob/master/LICENSE



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] lyssom commented on pull request #6599: [IOTDB-2569]Support ZSTD Compression

Posted by GitBox <gi...@apache.org>.
lyssom commented on PR #6599:
URL: https://github.com/apache/iotdb/pull/6599#issuecomment-1185312293

   > Hi, I see the latest version is v1.5.2-3 now, why don't you use it? And it may fix the bug that @liuzhen1207 mentioned.
   > 
   > https://github.com/luben/zstd-jni/releases/tag/v1.5.2-3
   
   sorry, I don't see their version clearly, so I don't chose their newest version. I also think we should choose newest version too.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] liuzhen1207 commented on pull request #6599: [IOTDB-2569]Support ZSTD Compression

Posted by GitBox <gi...@apache.org>.
liuzhen1207 commented on PR #6599:
URL: https://github.com/apache/iotdb/pull/6599#issuecomment-1179932698

   2台8C32G 机器,1台安装iotdb,1台benchmark:
   iotdb参数配置:
   MAX_HEAP_SIZE="16G"
   wal_buffer_size_in_byte=1048576
   default_storage_group_level=2
   
   compressor=ZSTD和SNAPPY对比,ZSTD对写入性能影响大。
   benchmark参数配置:
   DEVICE_NUMBER=2000
   SENSOR_NUMBER=1000
   CLIENT_NUMBER=100
   GROUP_NUMBER=50
   OPERATION_PROPORTION=70:1:1:1:1:0:1:1:1:1:1
   BATCH_SIZE_PER_WRITE=10
   IS_OUT_OF_ORDER=false
   LOOP=1000000
   LINE_RATIO=0
   SIN_RATIO=0
   SQUARE_RATIO=0
   RANDOM_RATIO=1
   CONSTANT_RATIO=0
   
   可以试试这个配置,ZSTD对写入性能影响更大,压缩比和SNAPPY差不多。
   > 您好,,麻烦请问这个测试方法是怎样的呢?或者有测试脚本吗?我也测一下,看看怎么优化
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] lyssom closed pull request #6599: [IOTDB-2569]Support ZSTD Compression

Posted by GitBox <gi...@apache.org>.
lyssom closed pull request #6599: [IOTDB-2569]Support ZSTD Compression
URL: https://github.com/apache/iotdb/pull/6599


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] lyssom commented on pull request #6599: [IOTDB-2569]Support ZSTD Compression

Posted by GitBox <gi...@apache.org>.
lyssom commented on PR #6599:
URL: https://github.com/apache/iotdb/pull/6599#issuecomment-1180079878

   > 2台8C32G 机器,1台安装iotdb,1台benchmark: iotdb参数配置: MAX_HEAP_SIZE="16G" wal_buffer_size_in_byte=1048576 default_storage_group_level=2
   > 
   > compressor=ZSTD和SNAPPY对比,ZSTD对写入性能影响大。 benchmark参数配置: DEVICE_NUMBER=2000 SENSOR_NUMBER=1000 CLIENT_NUMBER=100 GROUP_NUMBER=50 OPERATION_PROPORTION=70:1:1:1:1:0:1:1:1:1:1 BATCH_SIZE_PER_WRITE=10 IS_OUT_OF_ORDER=false LOOP=1000000 LINE_RATIO=0 SIN_RATIO=0 SQUARE_RATIO=0 RANDOM_RATIO=1 CONSTANT_RATIO=0
   > 
   > 可以试试这个配置,ZSTD对写入性能影响更大,压缩比和SNAPPY差不多。
   > 
   > > 您好,,麻烦请问这个测试方法是怎样的呢?或者有测试脚本吗?我也测一下,看看怎么优化
   好的,感谢感谢,我看看


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] HTHou commented on pull request #6599: [IOTDB-2569]Support ZSTD Compression

Posted by GitBox <gi...@apache.org>.
HTHou commented on PR #6599:
URL: https://github.com/apache/iotdb/pull/6599#issuecomment-1184049314

   Another question I would like to know, this there any reason that you choice the jni implement rather the pure Java version. 
   https://github.com/airlift/aircompressor/tree/master/src/main/java/io/airlift/compress/zstd
   
   Airlift said their version is actully 10-40% faster than the JNI one. See https://github.com/airlift/aircompressor
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] qiaojialin commented on a diff in pull request #6599: [IOTDB-2569]Support ZSTD Compression

Posted by GitBox <gi...@apache.org>.
qiaojialin commented on code in PR #6599:
URL: https://github.com/apache/iotdb/pull/6599#discussion_r916469178


##########
LICENSE-binary:
##########
@@ -229,6 +229,7 @@ com.fasterxml.jackson.core:jackson-core:2.10.0
 com.fasterxml.jackson.core:jackson-databind:2.10.0
 javax.inject:javax.inject:1
 net.jpountz.lz4:1.3.0
+com.github.luben.zstd-jni:1.3.2-6

Review Comment:
   This repo should use BSD license.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] lyssom commented on a diff in pull request #6599: [IOTDB-2569]Support ZSTD Compression

Posted by GitBox <gi...@apache.org>.
lyssom commented on code in PR #6599:
URL: https://github.com/apache/iotdb/pull/6599#discussion_r917632036


##########
LICENSE-binary:
##########
@@ -278,6 +277,7 @@ BSD 3-Clause
 org.antlr:antlr-runtime:4.8-1
 org.ow2.asm:asm:5.0.4
 org.jline:jline:3.21.0
+com.github.luben.zstd-jni:1.3.2-6

Review Comment:
   OK, I see and changed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] lyssom commented on pull request #6599: [IOTDB-2569]Support ZSTD Compression

Posted by GitBox <gi...@apache.org>.
lyssom commented on PR #6599:
URL: https://github.com/apache/iotdb/pull/6599#issuecomment-1179872162

   
   
   
   > ![1657278302629](https://user-images.githubusercontent.com/15992443/177980514-26d3af4c-ee3e-4ae2-ac89-cedcbdf7e9bc.png) ZSTD对写入性能有些影响(见数据)。
   
   您好,,麻烦请问这个测试方法是怎样的呢?或者有测试脚本吗?我也测一下,看看怎么优化


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] HTHou commented on pull request #6599: [IOTDB-2569]Support ZSTD Compression

Posted by GitBox <gi...@apache.org>.
HTHou commented on PR #6599:
URL: https://github.com/apache/iotdb/pull/6599#issuecomment-1185384762

   > 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] HTHou commented on pull request #6599: [IOTDB-2569]Support ZSTD Compression

Posted by GitBox <gi...@apache.org>.
HTHou commented on PR #6599:
URL: https://github.com/apache/iotdb/pull/6599#issuecomment-1185387298

   > > Another question I would like to know, this there any reason that you choose the jni implement rather than the pure Java version. https://github.com/airlift/aircompressor/tree/master/src/main/java/io/airlift/compress/zstd
   > > Airlift said their version is actully 10-40% faster than the JNI one. See https://github.com/airlift/aircompressor
   > 
   > I Reference apache pulsar, it used zstd-jni. I'm not familiar with Airlift, and do not see license discribe in there github, so I'm not sure if Airlift has copyright issues. If want to try Airlift, I rewrite mycode.
   
   Airlift has actually already introduced in IoTDB server module now, and the license is Apache 2.0. I think we can try it in a new PR to compare the performance.  :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] HTHou closed pull request #6599: [IOTDB-2569]Support ZSTD Compression

Posted by GitBox <gi...@apache.org>.
HTHou closed pull request #6599: [IOTDB-2569]Support ZSTD Compression
URL: https://github.com/apache/iotdb/pull/6599


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] lyssom commented on pull request #6599: [IOTDB-2569]Support ZSTD Compression

Posted by GitBox <gi...@apache.org>.
lyssom commented on PR #6599:
URL: https://github.com/apache/iotdb/pull/6599#issuecomment-1186078386

   > 
   
   
   
   > > > Another question I would like to know, this there any reason that you choose the jni implement rather than the pure Java version. https://github.com/airlift/aircompressor/tree/master/src/main/java/io/airlift/compress/zstd
   > > > Airlift said their version is actully 10-40% faster than the JNI one. See https://github.com/airlift/aircompressor
   > > 
   > > 
   > > I Reference apache pulsar, it used zstd-jni. I'm not familiar with Airlift, and do not see license discribe in there github, so I'm not sure if Airlift has copyright issues. If want to try Airlift, I rewrite mycode.
   > 
   > Airlift has actually already introduced in IoTDB server module now, and the license is Apache 2.0. I think we can try it in a new PR to compare the performance. :)
   
   ok


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] HTHou commented on pull request #6599: [IOTDB-2569]Support ZSTD Compression

Posted by GitBox <gi...@apache.org>.
HTHou commented on PR #6599:
URL: https://github.com/apache/iotdb/pull/6599#issuecomment-1184041985

   Hi, I see the latest version is v1.5.2-3 now, why don't you use it? And it may fix the bug that @liuzhen1207 mentioned.
   
   https://github.com/luben/zstd-jni/releases/tag/v1.5.2-3


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] liuzhen1207 commented on pull request #6599: [IOTDB-2569]Support ZSTD Compression

Posted by GitBox <gi...@apache.org>.
liuzhen1207 commented on PR #6599:
URL: https://github.com/apache/iotdb/pull/6599#issuecomment-1178858704

   
   ![1657278302629](https://user-images.githubusercontent.com/15992443/177980514-26d3af4c-ee3e-4ae2-ac89-cedcbdf7e9bc.png)
   ZSTD对写入性能有些影响(见数据)。
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] lyssom commented on pull request #6599: [IOTDB-2569]Support ZSTD Compression

Posted by GitBox <gi...@apache.org>.
lyssom commented on PR #6599:
URL: https://github.com/apache/iotdb/pull/6599#issuecomment-1189866613

   > > > Another question I would like to know, this there any reason that you choose the jni implement rather than the pure Java version. https://github.com/airlift/aircompressor/tree/master/src/main/java/io/airlift/compress/zstd
   > > > Airlift said their version is actully 10-40% faster than the JNI one. See https://github.com/airlift/aircompressor
   > > 
   > > 
   > > I Reference apache pulsar, it used zstd-jni. I'm not familiar with Airlift, and do not see license discribe in there github, so I'm not sure if Airlift has copyright issues. If want to try Airlift, I rewrite mycode.
   > 
   > Airlift has actually already introduced in IoTDB server module now, and the license is Apache 2.0. I think we can try it in a new PR to compare the performance. :)
   
   new PR is here, thanks for check:
   https://github.com/apache/iotdb/pull/6729


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] lyssom commented on a diff in pull request #6599: [IOTDB-2569]Support ZSTD Compression

Posted by GitBox <gi...@apache.org>.
lyssom commented on code in PR #6599:
URL: https://github.com/apache/iotdb/pull/6599#discussion_r916552573


##########
LICENSE-binary:
##########
@@ -229,6 +229,7 @@ com.fasterxml.jackson.core:jackson-core:2.10.0
 com.fasterxml.jackson.core:jackson-databind:2.10.0
 javax.inject:javax.inject:1
 net.jpountz.lz4:1.3.0
+com.github.luben.zstd-jni:1.3.2-6

Review Comment:
   ok,I changed it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] HTHou commented on a diff in pull request #6599: [IOTDB-2569]Support ZSTD Compression

Posted by GitBox <gi...@apache.org>.
HTHou commented on code in PR #6599:
URL: https://github.com/apache/iotdb/pull/6599#discussion_r917511824


##########
LICENSE-binary:
##########
@@ -278,6 +277,7 @@ BSD 3-Clause
 org.antlr:antlr-runtime:4.8-1
 org.ow2.asm:asm:5.0.4
 org.jline:jline:3.21.0
+com.github.luben.zstd-jni:1.3.2-6

Review Comment:
   Hi, I checked https://github.com/luben/zstd-jni#license and find out this package is actually under BSD 2-Clause license. 
   
   https://github.com/luben/zstd-jni#license



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] lyssom commented on pull request #6599: [IOTDB-2569]Support ZSTD Compression

Posted by GitBox <gi...@apache.org>.
lyssom commented on PR #6599:
URL: https://github.com/apache/iotdb/pull/6599#issuecomment-1185303935

   > Another question I would like to know, this there any reason that you choose the jni implement rather than the pure Java version. https://github.com/airlift/aircompressor/tree/master/src/main/java/io/airlift/compress/zstd
   > 
   > Airlift said their version is actully 10-40% faster than the JNI one. See https://github.com/airlift/aircompressor
   
   I Reference apache pulsar, it used zstd-jni.
   I'm not familiar with Airlift, and do not see license discribe in there github, so I'm not sure if Airlift has copyright issues.
   If want to try Airlift, I rewrite mycode.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [iotdb] liuzhen1207 commented on pull request #6599: [IOTDB-2569]Support ZSTD Compression

Posted by GitBox <gi...@apache.org>.
liuzhen1207 commented on PR #6599:
URL: https://github.com/apache/iotdb/pull/6599#issuecomment-1183883265

   运行36小时,iotdb进程消失,生成hs_err_pid文件
   [hs_err_pid17566.log](https://github.com/apache/iotdb/files/9107712/hs_err_pid17566.log)
   对写入性能影响大,此压缩方式的写入性能 约为snappy的10分之1
   
   > 2台8C32G 机器,1台安装iotdb,1台benchmark: iotdb参数配置:
    MAX_HEAP_SIZE="16G" 
   wal_buffer_size_in_byte=1048576 
   default_storage_group_level=2
    compressor=ZSTD
    benchmark参数配置: 
   DEVICE_NUMBER=2000 
   SENSOR_NUMBER=1000 
   CLIENT_NUMBER=100 
   GROUP_NUMBER=50 
   OPERATION_PROPORTION=70:1:1:1:1:0:1:1:1:1:1 
   BATCH_SIZE_PER_WRITE=10 
   IS_OUT_OF_ORDER=false 
   LOOP=1000000 LINE_RATIO=0 
   SIN_RATIO=0 
   SQUARE_RATIO=0 
   RANDOM_RATIO=1 
   CONSTANT_RATIO=0
   > 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org