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

Waste too much time on blob cache operation #203

Open
Connor1996 opened this issue Jan 26, 2021 · 2 comments
Open

Waste too much time on blob cache operation #203

Connor1996 opened this issue Jan 26, 2021 · 2 comments
Labels
type/bug Type: Issue - Confirmed a bug

Comments

@Connor1996
Copy link
Member

When doing a long scan with 1000 kvs on master, find it wastes too much CPU time on blob cache mutex and affect scan performance a lot.

image

But for 4.0, the scan performance is not affected a lot(sorry for the flame graph is missing)

@yiwu-arbug
Copy link
Collaborator

yiwu-arbug commented Jan 26, 2021

By default each cache shard is at least 512KB, which means if cache size is set to 0, there's only 1 shard. It will of course cause mutex contention. Can you try to set cache to a more practical size and see?

https://github.com/facebook/rocksdb/blob/master/cache/sharded_cache.cc#L149

@Connor1996
Copy link
Member Author

Yes, but seems the mutex contention causes too much overhead. And in 4.0 branch, it doesn't have that much overhead when size == 0. I'll take a deep look in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Type: Issue - Confirmed a bug
Projects
None yet
Development

No branches or pull requests

2 participants