Skip to content

[RFC] os/BlueStore: avoid double caching bluestore onodes in rocksdb block_cache - #27705

Closed
markhpc wants to merge 1 commit into
ceph:masterfrom
markhpc:wip-kv-onode-cache2
Closed

markhpc wants to merge 1 commit into
ceph:masterfrom
markhpc:wip-kv-onode-cache2

Conversation

@markhpc

@markhpc markhpc commented Apr 22, 2019

Copy link
Copy Markdown
Member

This PR reduces the occurrence of double caching bluestore onodes in the bluestore onode cache and rocksdb block cache. This is done by introducing the ability to create per-column family block caches and by default creating a separate column family for bluestore onodes. The onode-specific block cache competes independently of the rest of the rocksdb block cache for memory at a lower priority. This PR also slightly changes the priority cache chunking algorithm to avoid waste when caches are small.

4KB fio+librbd randwrite performance results are available here:

https://docs.google.com/spreadsheets/d/1oLNNtQ8Y3fhPPcMdrIeOulbvJoZhrVYNIRYAkXfJl64/edit?usp=sharing

Signed-off-by: Mark Nelson [email protected]

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

@markhpc

markhpc commented May 1, 2019

Copy link
Copy Markdown
Member Author

retest this please

@neha-ojha
neha-ojha requested review from jdurgin and neha-ojha May 2, 2019 21:03
Comment thread src/common/options.cc

Option("bluestore_cache_meta_ratio", Option::TYPE_FLOAT, Option::LEVEL_DEV)
.set_default(.4)
.set_default(.45)

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.

what's the motivation behind increasing the meta and kv ratio? cache_data_ratio now ends up becoming 0.06 from 0.2

@markhpc markhpc May 3, 2019 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It seems like we've pretty consistently seen that in memory limited scenarios (with rbd) that every bit of memory you can give to the onode cache helps significantly. Once we have the age-binning code in we can tweak this further to perhaps prioritize very recent data over older onodes at a higher rate, but I think for now we probably want to really aggressively prioritize bluestre onode cache and rocksdb block_cache for omap over data cache and rocksdb block_cache for onode.

The good news with the priority cache manager is that if the onode and omap block_cache don't need as much memory as their fair share would get them, that memory can be used for other caches like the data cache instead.

Comment thread src/common/options.cc

Option("bluestore_rocksdb_cfs", Option::TYPE_STR, Option::LEVEL_DEV)
.set_default("M= P= L=")
.set_default("O=")

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 would this have any effect on your sharding patches?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@jdurgin Yes, this PR will affect my sharding. Once this is merged, I will need to adapt to it, but its impact is very limited.

for (auto& i : cf_map) {
dout(10) << "column family " << i.first << ": " << i.second << dendl;
cfs.push_back(KeyValueDB::ColumnFamily(i.first, i.second));
bool share_cache = true;

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.

does this have any implications for reading DBs with the old set of column families?

@jdurgin jdurgin 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.

lgtm if the column family change does not impact on-disk format readabliity

@stale

stale Bot commented Jul 12, 2019

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@stale stale Bot added the stale label Jul 12, 2019
@markhpc

markhpc commented Jul 12, 2019

Copy link
Copy Markdown
Member Author

Domo Arigato Mr. Roboto! This isn't stale, just sleeping until Adam's sharding work is done!

@vumrao

vumrao commented Sep 6, 2019

Copy link
Copy Markdown
Contributor

@stale

stale Bot commented Nov 5, 2019

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@stale stale Bot added the stale label Nov 5, 2019
@markhpc markhpc removed the stale label Jan 16, 2020
@stale

stale Bot commented Jan 16, 2020

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@stale stale Bot added the stale label Jan 16, 2020
@markhpc markhpc mentioned this pull request Jan 17, 2020
1 of 3 tasks
@markhpc

markhpc commented Jan 23, 2020

Copy link
Copy Markdown
Member Author

still waiting on rocksdb sharding

@stale stale Bot removed the stale label Jan 23, 2020
@stale

stale Bot commented Mar 23, 2020

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@stale stale Bot added the stale label Mar 23, 2020
@jdurgin

jdurgin commented May 5, 2020

Copy link
Copy Markdown
Member

@stale

stale Bot commented Jul 4, 2020

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@stale stale Bot added the stale label Jul 4, 2020
@markhpc markhpc removed the stale label Jul 16, 2020
@stale

stale Bot commented Sep 17, 2020

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@stale stale Bot added the stale label Sep 17, 2020
@neha-ojha

Copy link
Copy Markdown
Member

unstale

@stale stale Bot removed the stale label Sep 17, 2020
@stale

stale Bot commented Nov 22, 2020

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@stale stale Bot added the stale label Nov 22, 2020
@markhpc

markhpc commented Jan 21, 2021

Copy link
Copy Markdown
Member Author

Closed in favor of #37391

@stale stale Bot removed the stale label Jan 21, 2021
@markhpc markhpc closed this Jan 21, 2021
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