Skip to content

alternator: implement TableClass attribute by changing compression#20520

Draft
nyh wants to merge 1 commit intoscylladb:masterfrom
nyh:test-10431
Draft

alternator: implement TableClass attribute by changing compression#20520
nyh wants to merge 1 commit intoscylladb:masterfrom
nyh:test-10431

Conversation

@nyh
Copy link
Copy Markdown
Contributor

@nyh nyh commented Sep 10, 2024

NOTE: THIS PATCH IS INCOMPLETE, IT INCLUDES JUST A COMPLETE TEST FOR THIS FEATURE - NOT THE IMPLEMENTATION (WHICH SHOULD BE FAIRLY STRAIGHTFORWARD).

DynamoDB announced in December 2021 a new attribute of a table, called table class. The choice of "table class" doesn't change anything in the table's capabilities - it just controls the pricing of storage and access: There are currently two options - STANDARD (the default) and STANDARD_INFREQUENT_ACCESS. The latter is for infrequently-accessed tables, its the data storage costs are lower (in DynamoDB, by 60%), while reads and writes are more expensive (in DynamoDB, by 25%).

In this patch we map the TableClass option in Scylla to different sstable compression settings:

STANDARD uses to the existing default compression of lz4, which gives reasonable compression ratios at small CPU overhead.

STANDARD_INFREQUENT_ACCESS uses zstd compressions, which gives better compression ratios, with higher CPU overhead.

TODO: implementation
TODO: benchmarks giving example of performance reduction and disk saving

Fixes #10431

NOTE: THIS PATCH IS INCOMPLETE, IT INCLUDES JUST A COMPLETE TEST FOR
THIS FEATURE - NOT THE IMPLEMENTATION (WHICH SHOULD BE FAIRLY STRAIGHTFORWARD).

DynamoDB announced in December 2021 a new attribute of a table, called
table class. The choice of "table class" doesn't change anything in the
table's capabilities - it just controls the pricing of storage and access:
There are currently two options - STANDARD (the default) and
STANDARD_INFREQUENT_ACCESS. The latter is for infrequently-accessed tables,
its the data storage costs are lower (in DynamoDB, by 60%), while reads and
writes are more expensive (in DynamoDB, by 25%).

In this patch we map the TableClass option in Scylla to different
sstable compression settings:

STANDARD uses to the existing default compression of lz4, which gives
reasonable compression ratios at small CPU overhead.

STANDARD_INFREQUENT_ACCESS uses zstd compressions, which gives better
compression ratios, with higher CPU overhead.

TODO: implementation
TODO: benchmarks giving example of performance reduction and disk saving

Fixes scylladb#10431

Signed-off-by: Nadav Har'El <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/alternator Alternator related Issues enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Alternator: support new table attribute "TableClass"

1 participant