Estimate compression #766

Merged
fyrchik merged 1 commits from dstepanov-yadro/frostfs-node:feat/compressible into master 2023-11-01 10:08:28 +00:00

Closes #754

Now it is possible to use compression estimation if config has this option enabled.

It should reduce CPU and memory usage in case of the uncompressible objects.

Benchmarks are here: #754 (comment)

Closes #754 Now it is possible to use compression estimation if config has this option enabled. It should reduce CPU and memory usage in case of the uncompressible objects. Benchmarks are here: https://git.frostfs.info/TrueCloudLab/frostfs-node/issues/754#issuecomment-24880
dstepanov-yadro force-pushed feat/compressible from af8c053722 to 2cd9654caf 2023-10-31 11:47:17 +00:00 Compare
dstepanov-yadro force-pushed feat/compressible from 2cd9654caf to 6fd70b013f 2023-10-31 12:06:41 +00:00 Compare
dstepanov-yadro force-pushed feat/compressible from 6fd70b013f to c7d2872d3c 2023-10-31 12:07:29 +00:00 Compare
dstepanov-yadro changed title from WIP to WIP: Estimate compression 2023-10-31 12:23:23 +00:00
fyrchik reviewed 2023-10-31 12:55:03 +00:00
@ -84,3 +84,4 @@
require.Equal(t, true, sc.Compress())
require.Equal(t, []string{"audio/*", "video/*"}, sc.UncompressableContentTypes())
require.Equal(t, true, sc.EstimateCompressibility())

Do we need 2 parameters here? I mean we can use anything >=1.0 to disable and 0.9 by default.

Do we need 2 parameters here? I mean we can use anything >=1.0 to disable and 0.9 by default.
Poster
Collaborator

I prefer separate explicit parameters.

I prefer separate explicit parameters.

My thoughts here we that we have compress: bool feature already and this is merely a parameter. compress: false, estimate_compressibility: true is possible, but somewhat invalid state.

My thoughts here we that we have `compress: bool` feature already and this is merely a parameter. `compress: false, estimate_compressibility: true` is possible, but somewhat invalid state.
dstepanov-yadro force-pushed feat/compressible from c7d2872d3c to eda51f8324 2023-10-31 14:31:15 +00:00 Compare
dstepanov-yadro force-pushed feat/compressible from eda51f8324 to 1548b70154 2023-10-31 14:38:11 +00:00 Compare
dstepanov-yadro changed title from WIP: Estimate compression to Estimate compression 2023-10-31 15:10:30 +00:00
dstepanov-yadro requested review from storage-core-committers 2023-10-31 15:11:11 +00:00
dstepanov-yadro requested review from storage-core-developers 2023-10-31 15:11:11 +00:00
acid-ant approved these changes 2023-11-01 06:13:04 +00:00
fyrchik reviewed 2023-11-01 07:43:27 +00:00
@ -108,1 +108,3 @@
compress bool
compress bool
estimateCompressibility bool
estimateCompressibilityThreshold float64

docs/storage-node-configuration.md needs to be changed too.

`docs/storage-node-configuration.md` needs to be changed too.
Poster
Collaborator

Done

Done
fyrchik marked this conversation as resolved
@ -43,6 +46,30 @@ func (x *Config) UncompressableContentTypes() []string {
"compression_exclude_content_types")
}
// EstimateCompressibility returns the value of "estimate_compressability" config parameter.

Why is it named compress_i_bility in code, but compress_a_bility in config? I haven't seen variant with 'a' TBH

Why is it named `compress_i_bility` in code, but `compress_a_bility` in config? I haven't seen variant with 'a' TBH
Poster
Collaborator

Fixed

Fixed
fyrchik marked this conversation as resolved
@ -113,6 +113,8 @@ FROSTFS_STORAGE_SHARD_0_METABASE_MAX_BATCH_DELAY=10ms
### Blobstor config
FROSTFS_STORAGE_SHARD_0_COMPRESS=true
FROSTFS_STORAGE_SHARD_0_COMPRESSION_EXCLUDE_CONTENT_TYPES="audio/* video/*"
FROSTFS_STORAGE_SHARD_0_ESTIMATE_COMPRESSABILITY=true

Also, what about using COMPRESSION prefix? Like COMPRESSION_EXCLUDE_TYPES, we could later move it in a separate section.

Also, what about using `COMPRESSION` prefix? Like `COMPRESSION_EXCLUDE_TYPES`, we could later move it in a separate section.
Poster
Collaborator

Done

Done
fyrchik marked this conversation as resolved
dstepanov-yadro force-pushed feat/compressible from 1548b70154 to c80b46fad3 2023-11-01 08:24:59 +00:00 Compare
fyrchik approved these changes 2023-11-01 08:29:16 +00:00
fyrchik merged commit c80b46fad3 into master 2023-11-01 10:08:28 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#766
There is no content yet.