Skip to content

Add ability to control rocksdb block cache - #37391

Merged
neha-ojha merged 3 commits into
ceph:masterfrom
aclamk:wip-kv-onode-cache
Jan 16, 2021
Merged

neha-ojha merged 3 commits into
ceph:masterfrom
aclamk:wip-kv-onode-cache

Conversation

@aclamk

@aclamk aclamk commented Sep 24, 2020

Copy link
Copy Markdown
Contributor

Adds artificial option "block_cache" to grammar of column family.
Allows to specify separate block cache to column family (all its shards).
Allows to apply default block cache, but with different BlockBasedTableOptions options.

@markhpc markhpc left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@aclamk LGTM on the surface, it would be good to verify if that it's helping in a similar way as #27705. Do you feel comfortable running tests?

Oh, we will need the extra tooling and support to deal with on-disk-format-change too, but perhaps you are adding that as a separate PR?

@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@aclamk
aclamk force-pushed the wip-kv-onode-cache branch from 1afc515 to e3a8a05 Compare January 15, 2021 16:20
Modified original onode column family cache into generic feature.
Now 2 options are possible for each column family:
1) use generic block cache but apply different BlockBasedTableOptions
2) create separate block cache. it will be applied for all shards of column family

It is done by specifying special option "block_cache" to CF definition:
Example: O(3,0-13)=block_cache={high_ratio=1.000}

"block_cache" accepts all BlockBasedTableOptions options with additions:
-"type" - binned_lru/lru/clock (default: ceph_options.rocksdb_cache_type)
-"size" - e.g.: 100M           (default: ceph_options.rocksdb_cache_size)
-"high_ratio" - e.g.: 0.75     (default: 0.0)
If any of above is set, new block cache is created, otherwise default is used.

Signed-off-by: Adam Kupczyk <[email protected]>
@neha-ojha

Copy link
Copy Markdown
Member

@neha-ojha
neha-ojha merged commit 3920085 into ceph:master Jan 16, 2021
@markhpc

markhpc commented Jan 18, 2021

Copy link
Copy Markdown
Member

Congrats everyone! :)

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