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

nydus-image: support small chunks mergence #1202

Merged
merged 4 commits into from
Apr 18, 2023

Conversation

hangvane
Copy link
Contributor

@hangvane hangvane commented Apr 7, 2023

Add the support of merging small file chunks into one batch chunk, for ConversionType::DirectoryToRafs, ConversionType::EStargzToRafs, ConversionType::TargzToRafs, and ConversionType::TarToRafs.

basic usage

Add the --batch-size arg to command to enable chunk mergence for supported conversion types:

nydus-image create --bootstrap ~/bootstrap --blob-dir ~/blobs ~/source --batch-size 0x100000

nydus-image create --type estargz-rafs --bootstrap ~/bootstrap --blob-dir ~/blobs ~/source.tar.gz --batch-size 0x100000

nydus-image create --type targz-rafs --bootstrap ~/bootstrap --blob-dir ~/blobs ~/source.tar.gz --batch-size 0x100000

nydus-image create --type tar-rafs --bootstrap ~/bootstrap --blob-dir ~/blobs ~/source.tar --batch-size 0x100000

benchmarks

  • 4K-aligned: append zeros to chunk data buffer so that the data to be compressed is 4K aligned.
  • continuous: a big chunk between small chunks will cut the batch chunk.
  • 1/2 filtered: do not merge chunks with their uncompressed size bigger than 1/2 batch size.
repositories tags 4K-aligned continuous 1/2 filtered size (MiB) %
wordpress latest - - - 207.36 -
wordpress latest-rafs - - - 211.17 +1.84%
wordpress latest-rafs-batch-64K 205.63 -0.83%
wordpress latest-rafs-batch-64K 205.62 -0.84%
wordpress latest-rafs-batch-64K 205.76 -0.77%
wordpress latest-rafs-batch-64K 206.17 -0.57%
wordpress latest-rafs-batch-64K 206.16 -0.58%
wordpress latest-rafs-batch-64K 205.85 -0.72%
wordpress latest-rafs-batch-64K 206.28 -0.52%
wordpress latest-rafs-batch-64K 206.36 -0.48%
wordpress latest-rafs-batch-128K 204.01 -1.62%
wordpress latest-rafs-batch-128K 203.91 -1.66%
wordpress latest-rafs-batch-128K 204.06 -1.59%
wordpress latest-rafs-batch-128K 204.41 -1.42%
wordpress latest-rafs-batch-128K 204.41 -1.42%
wordpress latest-rafs-batch-128K 204.19 -1.53%
wordpress latest-rafs-batch-128K 204.48 -1.39%
wordpress latest-rafs-batch-128K 204.61 -1.32%
wordpress latest-rafs-batch-256K 201.39 -2.88%
wordpress latest-rafs-batch-256K 201.28 -2.93%
wordpress latest-rafs-batch-256K 201.44 -2.85%
wordpress latest-rafs-batch-256K 201.92 -2.62%
wordpress latest-rafs-batch-256K 201.77 -2.69%
wordpress latest-rafs-batch-256K 201.45 -2.85%
wordpress latest-rafs-batch-256K 201.89 -2.64%
wordpress latest-rafs-batch-256K 201.96 -2.61%
wordpress latest-rafs-batch-512K 199.23 -3.92%
wordpress latest-rafs-batch-512K 199.32 -3.88%
wordpress latest-rafs-batch-512K 199.26 -3.90%
wordpress latest-rafs-batch-512K 199.35 -3.86%
wordpress latest-rafs-batch-512K 199.23 -3.92%
wordpress latest-rafs-batch-512K 199.07 -4.00%
wordpress latest-rafs-batch-512K 199.43 -3.82%
wordpress latest-rafs-batch-512K 199.50 -3.79%
wordpress latest-rafs-batch-1M 196.65 -5.16%
wordpress latest-rafs-batch-1M 196.67 -5.16%
wordpress latest-rafs-batch-1M 196.67 -5.15%
wordpress latest-rafs-batch-1M 197.31 -4.84%
wordpress latest-rafs-batch-1M 197.25 -4.87%
wordpress latest-rafs-batch-1M 196.71 -5.14%
wordpress latest-rafs-batch-1M 197.34 -4.83%
wordpress latest-rafs-batch-1M 197.41 -4.80%
wordpress php8.2-fpm-alpine - - - 98.31 -
wordpress php8.2-fpm-alpine-rafs - - - 99.15 +0.85%
wordpress php8.2-fpm-alpine-rafs-batch-64K 97.04 -1.30%
wordpress php8.2-fpm-alpine-rafs-batch-64K 97.01 -1.32%
wordpress php8.2-fpm-alpine-rafs-batch-64K 97.10 -1.23%
wordpress php8.2-fpm-alpine-rafs-batch-64K 97.23 -1.10%
wordpress php8.2-fpm-alpine-rafs-batch-64K 97.23 -1.10%
wordpress php8.2-fpm-alpine-rafs-batch-64K 97.13 -1.21%
wordpress php8.2-fpm-alpine-rafs-batch-64K 97.30 -1.03%
wordpress php8.2-fpm-alpine-rafs-batch-64K 97.34 -0.99%
wordpress php8.2-fpm-alpine-rafs-batch-128K 96.54 -1.80%
wordpress php8.2-fpm-alpine-rafs-batch-128K 96.48 -1.86%
wordpress php8.2-fpm-alpine-rafs-batch-128K 96.58 -1.76%
wordpress php8.2-fpm-alpine-rafs-batch-128K 96.68 -1.67%
wordpress php8.2-fpm-alpine-rafs-batch-128K 96.66 -1.69%
wordpress php8.2-fpm-alpine-rafs-batch-128K 96.63 -1.71%
wordpress php8.2-fpm-alpine-rafs-batch-128K 96.71 -1.63%
wordpress php8.2-fpm-alpine-rafs-batch-128K 96.76 -1.58%
wordpress php8.2-fpm-alpine-rafs-batch-256K 95.91 -2.45%
wordpress php8.2-fpm-alpine-rafs-batch-256K 95.89 -2.46%
wordpress php8.2-fpm-alpine-rafs-batch-256K 95.92 -2.43%
wordpress php8.2-fpm-alpine-rafs-batch-256K 96.02 -2.34%
wordpress php8.2-fpm-alpine-rafs-batch-256K 96.03 -2.32%
wordpress php8.2-fpm-alpine-rafs-batch-256K 95.98 -2.37%
wordpress php8.2-fpm-alpine-rafs-batch-256K 96.02 -2.33%
wordpress php8.2-fpm-alpine-rafs-batch-256K 96.11 -2.24%
wordpress php8.2-fpm-alpine-rafs-batch-512K 95.23 -3.14%
wordpress php8.2-fpm-alpine-rafs-batch-512K 95.35 -3.01%
wordpress php8.2-fpm-alpine-rafs-batch-512K 95.27 -3.10%
wordpress php8.2-fpm-alpine-rafs-batch-512K 95.35 -3.01%
wordpress php8.2-fpm-alpine-rafs-batch-512K 95.43 -2.93%
wordpress php8.2-fpm-alpine-rafs-batch-512K 95.42 -2.94%
wordpress php8.2-fpm-alpine-rafs-batch-512K 95.31 -3.05%
wordpress php8.2-fpm-alpine-rafs-batch-512K 95.49 -2.88%
wordpress php8.2-fpm-alpine-rafs-batch-1M 94.66 -3.72%
wordpress php8.2-fpm-alpine-rafs-batch-1M 94.61 -3.76%
wordpress php8.2-fpm-alpine-rafs-batch-1M 94.59 -3.78%
wordpress php8.2-fpm-alpine-rafs-batch-1M 94.94 -3.43%
wordpress php8.2-fpm-alpine-rafs-batch-1M 94.67 -3.71%
wordpress php8.2-fpm-alpine-rafs-batch-1M 94.64 -3.73%
wordpress php8.2-fpm-alpine-rafs-batch-1M 94.87 -3.50%
wordpress php8.2-fpm-alpine-rafs-batch-1M 94.91 -3.46%
python latest - - - 335.56 -
python latest-rafs - - - 324.83 - 3.20%
python latest-rafs-batch-64K 317.84 -5.28%
python latest-rafs-batch-64K 317.75 -5.31%
python latest-rafs-batch-64K 317.92 -5.26%
python latest-rafs-batch-64K 318.48 -5.09%
python latest-rafs-batch-64K 318.38 -5.12%
python latest-rafs-batch-64K 318.08 -5.21%
python latest-rafs-batch-64K 318.59 -5.06%
python latest-rafs-batch-64K 318.67 -5.03%
python latest-rafs-batch-128K 315.59 -5.95%
python latest-rafs-batch-128K 315.40 -6.01%
python latest-rafs-batch-128K 315.63 -5.94%
python latest-rafs-batch-128K 315.95 -5.85%
python latest-rafs-batch-128K 315.94 -5.85%
python latest-rafs-batch-128K 315.73 -5.91%
python latest-rafs-batch-128K 316.09 -5.80%
python latest-rafs-batch-128K 316.23 -5.76%
python latest-rafs-batch-256K 312.31 -6.93%
python latest-rafs-batch-256K 312.01 -7.02%
python latest-rafs-batch-256K 312.42 -6.90%
python latest-rafs-batch-256K 312.66 -6.82%
python latest-rafs-batch-256K 312.47 -6.88%
python latest-rafs-batch-256K 312.54 -6.86%
python latest-rafs-batch-256K 312.81 -6.78%
python latest-rafs-batch-256K 312.97 -6.73%
python latest-rafs-batch-512K 309.06 -7.90%
python latest-rafs-batch-512K 308.97 -7.92%
python latest-rafs-batch-512K 309.06 -7.90%
python latest-rafs-batch-512K 309.23 -7.85%
python latest-rafs-batch-512K 309.19 -7.86%
python latest-rafs-batch-512K 308.86 -7.96%
python latest-rafs-batch-512K 309.38 -7.80%
python latest-rafs-batch-512K 309.49 -7.77%
python latest-rafs-batch-1M 304.29 -9.32%
python latest-rafs-batch-1M 304.67 -9.21%
python latest-rafs-batch-1M 304.31 -9.31%
python latest-rafs-batch-1M 304.62 -9.22%
python latest-rafs-batch-1M 304.90 -9.14%
python latest-rafs-batch-1M 304.74 -9.18%
python latest-rafs-batch-1M 304.55 -9.24%
python latest-rafs-batch-1M 305.08 -9.08%
python alpine3.17 - - - 18.64 -
python alpine3.17-rafs - - - 20.01 +7.35%
python alpine3.17-rafs-batch-64K 19.23 +3.16%
python alpine3.17-rafs-batch-64K 19.22 +3.11%
python alpine3.17-rafs-batch-64K 19.24 +3.22%
python alpine3.17-rafs-batch-64K 19.36 +3.88%
python alpine3.17-rafs-batch-64K 19.35 +3.84%
python alpine3.17-rafs-batch-64K 19.27 +3.38%
python alpine3.17-rafs-batch-64K 19.36 +3.88%
python alpine3.17-rafs-batch-64K 19.37 +3.93%
python alpine3.17-rafs-batch-128K 19.02 +2.04%
python alpine3.17-rafs-batch-128K 19.00 +1.93%
python alpine3.17-rafs-batch-128K 19.02 +2.07%
python alpine3.17-rafs-batch-128K 19.11 +2.55%
python alpine3.17-rafs-batch-128K 19.10 +2.50%
python alpine3.17-rafs-batch-128K 19.03 +2.11%
python alpine3.17-rafs-batch-128K 19.13 +2.64%
python alpine3.17-rafs-batch-128K 19.13 +2.63%
python alpine3.17-rafs-batch-256K 18.76 +0.64%
python alpine3.17-rafs-batch-256K 18.75 +0.59%
python alpine3.17-rafs-batch-256K 18.77 +0.70%
python alpine3.17-rafs-batch-256K 18.85 +1.17%
python alpine3.17-rafs-batch-256K 18.83 +1.05%
python alpine3.17-rafs-batch-256K 18.78 +0.76%
python alpine3.17-rafs-batch-256K 18.86 +1.19%
python alpine3.17-rafs-batch-256K 18.86 +1.18%
python alpine3.17-rafs-batch-512K 18.55 -0.44%
python alpine3.17-rafs-batch-512K 18.53 -0.59%
python alpine3.17-rafs-batch-512K 18.55 -0.44%
python alpine3.17-rafs-batch-512K 18.67 +0.19%
python alpine3.17-rafs-batch-512K 18.66 +0.11%
python alpine3.17-rafs-batch-512K 18.53 -0.54%
python alpine3.17-rafs-batch-512K 18.68 +0.25%
python alpine3.17-rafs-batch-512K 18.70 +0.35%
python alpine3.17-rafs-batch-1M 18.38 -1.40%
python alpine3.17-rafs-batch-1M 18.37 -1.45%
python alpine3.17-rafs-batch-1M 18.38 -1.39%
python alpine3.17-rafs-batch-1M 18.36 -1.49%
python alpine3.17-rafs-batch-1M 18.36 -1.50%
python alpine3.17-rafs-batch-1M 18.38 -1.40%
python alpine3.17-rafs-batch-1M 18.36 -1.47%
python alpine3.17-rafs-batch-1M 18.36 -1.47%
node latest - - - 353.79 -
node latest-rafs - - - 335.46 - 5.18%
node latest-rafs-batch-64K 328.16 -7.25%
node latest-rafs-batch-64K 328.07 -7.27%
node latest-rafs-batch-64K 328.24 -7.22%
node latest-rafs-batch-64K 328.87 -7.04%
node latest-rafs-batch-64K 328.79 -7.07%
node latest-rafs-batch-64K 328.40 -7.18%
node latest-rafs-batch-64K 328.98 -7.01%
node latest-rafs-batch-64K 329.07 -6.99%
node latest-rafs-batch-128K 325.92 -7.88%
node latest-rafs-batch-128K 325.75 -7.93%
node latest-rafs-batch-128K 325.98 -7.86%
node latest-rafs-batch-128K 326.32 -7.76%
node latest-rafs-batch-128K 326.33 -7.76%
node latest-rafs-batch-128K 326.07 -7.84%
node latest-rafs-batch-128K 326.46 -7.73%
node latest-rafs-batch-128K 326.58 -7.69%
node latest-rafs-batch-256K 322.75 -8.78%
node latest-rafs-batch-256K 322.43 -8.86%
node latest-rafs-batch-256K 322.84 -8.75%
node latest-rafs-batch-256K 323.10 -8.68%
node latest-rafs-batch-256K 322.92 -8.73%
node latest-rafs-batch-256K 322.91 -8.73%
node latest-rafs-batch-256K 323.25 -8.63%
node latest-rafs-batch-256K 323.36 -8.60%
node latest-rafs-batch-512K 319.57 -9.67%
node latest-rafs-batch-512K 319.57 -9.67%
node latest-rafs-batch-512K 319.57 -9.67%
node latest-rafs-batch-512K 319.83 -9.60%
node latest-rafs-batch-512K 319.82 -9.60%
node latest-rafs-batch-512K 319.40 -9.72%
node latest-rafs-batch-512K 319.96 -9.56%
node latest-rafs-batch-512K 320.07 -9.53%
node latest-rafs-batch-1M 315.13 -10.93%
node latest-rafs-batch-1M 315.51 -10.82%
node latest-rafs-batch-1M 315.19 -10.91%
node latest-rafs-batch-1M 315.50 -10.82%
node latest-rafs-batch-1M 315.79 -10.74%
node latest-rafs-batch-1M 315.61 -10.79%
node latest-rafs-batch-1M 315.52 -10.82%
node latest-rafs-batch-1M 315.95 -10.70%
node 19-alpine - - - 51.47 -
node 19-alpine-rafs - - - 43.89 - 14.73%
node 19-alpine-rafs-batch-64K 43.10 -16.27%
node 19-alpine-rafs-batch-64K 43.09 -16.28%
node 19-alpine-rafs-batch-64K 43.10 -16.25%
node 19-alpine-rafs-batch-64K 43.22 -16.03%
node 19-alpine-rafs-batch-64K 43.22 -16.03%
node 19-alpine-rafs-batch-64K 43.12 -16.23%
node 19-alpine-rafs-batch-64K 43.21 -16.04%
node 19-alpine-rafs-batch-64K 43.23 -16.01%
node 19-alpine-rafs-batch-128K 42.94 -16.57%
node 19-alpine-rafs-batch-128K 42.93 -16.59%
node 19-alpine-rafs-batch-128K 42.94 -16.57%
node 19-alpine-rafs-batch-128K 43.03 -16.40%
node 19-alpine-rafs-batch-128K 43.02 -16.42%
node 19-alpine-rafs-batch-128K 42.94 -16.57%
node 19-alpine-rafs-batch-128K 43.03 -16.40%
node 19-alpine-rafs-batch-128K 43.02 -16.40%
node 19-alpine-rafs-batch-256K 42.78 -16.89%
node 19-alpine-rafs-batch-256K 42.77 -16.90%
node 19-alpine-rafs-batch-256K 42.77 -16.90%
node 19-alpine-rafs-batch-256K 42.86 -16.72%
node 19-alpine-rafs-batch-256K 42.86 -16.73%
node 19-alpine-rafs-batch-256K 42.78 -16.89%
node 19-alpine-rafs-batch-256K 42.88 -16.68%
node 19-alpine-rafs-batch-256K 42.88 -16.68%
node 19-alpine-rafs-batch-512K 42.67 -17.09%
node 19-alpine-rafs-batch-512K 42.67 -17.10%
node 19-alpine-rafs-batch-512K 42.67 -17.09%
node 19-alpine-rafs-batch-512K 42.76 -16.92%
node 19-alpine-rafs-batch-512K 42.76 -16.92%
node 19-alpine-rafs-batch-512K 42.67 -17.09%
node 19-alpine-rafs-batch-512K 42.74 -16.95%
node 19-alpine-rafs-batch-512K 42.74 -16.95%
node 19-alpine-rafs-batch-1M 42.59 -17.25%
node 19-alpine-rafs-batch-1M 42.58 -17.27%
node 19-alpine-rafs-batch-1M 42.61 -17.21%
node 19-alpine-rafs-batch-1M 42.69 -17.05%
node 19-alpine-rafs-batch-1M 42.69 -17.06%
node 19-alpine-rafs-batch-1M 42.61 -17.21%
node 19-alpine-rafs-batch-1M 42.66 -17.11%
node 19-alpine-rafs-batch-1M 42.66 -17.11%

This PR is related to #884, #885, dragonflyoss/Dragonfly2#1858

@hangvane hangvane requested a review from a team as a code owner April 7, 2023 15:21
@hangvane hangvane requested review from liubin, changweige and adamqqqplay and removed request for a team April 7, 2023 15:21
@hangvane hangvane changed the title [WIP] nydus-image: support small chunks mergence nydus-image: support small chunks mergence Apr 8, 2023
@hangvane
Copy link
Contributor Author

/retest

@anolis-bot
Copy link
Collaborator

@hangvane , the test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/64962

@adamqqqplay
Copy link
Member

Thanks for your contribution! Maybe you could squash these commits?

@anolis-bot
Copy link
Collaborator

@hangvane , The CI test is completed, please check result:

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

@anolis-bot
Copy link
Collaborator

@hangvane , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/64990

@anolis-bot
Copy link
Collaborator

@hangvane , The CI test is completed, please check result:

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

@anolis-bot
Copy link
Collaborator

@hangvane , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/65282

@anolis-bot
Copy link
Collaborator

@hangvane , The CI test is completed, please check result:

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

@hangvane
Copy link
Contributor Author

Thanks for your contribution! Maybe you could squash these commits?

@adamqqqplay Thanks for your advice! Would you please explain why squashing commits is needed? I'm a beginner of github, and I'm afraid of messing up this PR by mistake.

@anolis-bot
Copy link
Collaborator

@hangvane , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/65304

Copy link
Member

@adamqqqplay adamqqqplay left a comment

Choose a reason for hiding this comment

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

Everything looks good, thanks for your great work!

@hangvane
Copy link
Contributor Author

hangvane commented Apr 17, 2023

@jiangliu A problem about runtime decompressing is considering. Please do not merge this PR at this time. I'll add more benchmark cases for discussion.

@anolis-bot
Copy link
Collaborator

@hangvane , the title has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/68263

@anolis-bot
Copy link
Collaborator

@hangvane , The CI test is completed, please check result:

Test CaseTest Result
nydus_ci❌ FAIL

Sorry, your test job failed. Please get the details in the link.

@anolis-bot
Copy link
Collaborator

@hangvane , the title has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/68281

@anolis-bot
Copy link
Collaborator

@hangvane , The CI test is completed, please check result:

Test CaseTest Result
nydus_ci❌ FAIL

Sorry, your test job failed. Please get the details in the link.

Check `zran` flag before set `zran` values.
Refine comments.

Signed-off-by: Wenhao Ren <[email protected]>
Refactor `Node::dump_file_chunk()` to reuse data compress and write procedure.

Signed-off-by: Wenhao Ren <[email protected]>
Enhance chunk info to support batch chunk.
Introduce BatchInflateContext and generator.

Signed-off-by: Wenhao Ren <[email protected]>
Add `--batch-size` subcommand on nydus-image.
Add build time support of batch chunk.

Signed-off-by: Wenhao Ren <[email protected]>
@anolis-bot
Copy link
Collaborator

@hangvane , the code has been updated, so a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/68393

@anolis-bot
Copy link
Collaborator

@hangvane , The CI test is completed, please check result:

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

@jiangliu
Copy link
Collaborator

According to the test result, how about the default configuration of:

  • 4k aligned = true: simplify runtime handling of batched chunks
  • continuous = false: it causes compression ratio decrease without any benefits.
  • 1/2 filter = true: it achieves better compression ratios under most cases

@hangvane
Copy link
Contributor Author

According to the test result, how about the default configuration of:

  • 4k aligned = true: simplify runtime handling of batched chunks
  • continuous = false: it causes compression ratio decrease without any benefits.
  • 1/2 filter = true: it achieves better compression ratios under most cases

@jiangliu The basic idea is that, continuous = true is used combined with 4k aligned = true to simplify runtime handling of batched chunks, that the raw decompressed batch chunk data can be dumped to uncompressed blob data as a whole without the consideration of each small chunk and its chunk info. Since the basic idea is wrong, that we need all the chunk info of small chunks anyway, it seems inappropriate to adopt continuous = true and 4k aligned = true. Unless otherwise motivated, I think it's better not to add these two features and keep the code in this PR as it is.

As for 1/2 filter, we can add a configuration to give the user the ability to set this feature. But I think just enable this feature hard-coded, keep the code in this PR as what it is currently, is good enough already.

@jiangliu
Copy link
Collaborator

According to the test result, how about the default configuration of:

  • 4k aligned = true: simplify runtime handling of batched chunks
  • continuous = false: it causes compression ratio decrease without any benefits.
  • 1/2 filter = true: it achieves better compression ratios under most cases

@jiangliu The basic idea is that, continuous = true is used combined with 4k aligned = true to simplify runtime handling of batched chunks, that the raw decompressed batch chunk data can be dumped to uncompressed blob data as a whole without the consideration of each small chunk and its chunk info. Since the basic idea is wrong, that we need all the chunk info of small chunks anyway, it seems inappropriate to adopt continuous = true and 4k aligned = true. Unless otherwise motivated, I think it's better not to add these two features and keep the code in this PR as it is.

As for 1/2 filter, we can add a configuration to give the user the ability to set this feature. But I think just enable this feature hard-coded, keep the code in this PR as what it is currently, is good enough already.

It would be better to avoid introducing configuration for 1/2 filter, the benefit is trivial and keep it simple for users.

@jiangliu jiangliu merged commit e8ba11a into dragonflyoss:master Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants