-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Introduce optimize_filters_for_hits to cf_config #3733
Conversation
Em, if we use Raw mode, we can't disable it. Can we change this dynamically? |
@solotzg It's not friendly for the community to put an internal link here, please show your result here directly so that everyone can understand it, thanks. |
Have you observed the cache hit ratio? If you save 15% memory usage, it means that it can cache more data in memory, so the cache hit ratio is expected to increase more or less. |
IMO, maybe we can disable bloom filter for Raft CF and Raft DB. because we can ensure the data can be found. /cc @BusyJay |
@huachaohuang I haven't observed the cache hit ratio. I recorded and compared the memory usage of TiKV after job |
79748de
to
3df4d97
Compare
Signed-off-by: Tong Zhigao <tongzhigao@pingcap.com>
657418a
to
4dd347e
Compare
If the size of value is less than 64B, this kind of short value would be embed into
Read Config:
TiKV master:
result:
TiKV _optimize_filters_for_hits:
result:
|
What are the size of memory and dataset, how about the cache hit ratio? |
TiKV master:
TiKV _optimize_filters_for_hits:
@huachaohuang But the benchmark result is not stable. Sometimes, TiKV master is better. |
TiKV master:TiKV _optimize_filters_for_hits:TestBoth test cases have loaded 30m records, and benchmark reading under situation
But performance of the one optimized is not as good as expected. Maybe there are some other operations in |
Newest TestTiKV _optimize_filters_for_hitsTiKV Configuration
Test Resultgo-ycsb load data
go-ycsb read data
TiKV masterTiKV Configuration
Test Resultgo-ycsb load data
go-ycsb read data
Grafana |
SetupHardware
Configurations
Dataset: number of keys = 100,000,000, value size = 64B Results
Conclusion: the optimization in this PR increases the read ops in this PR for 5.6%. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Tong Zhigao <tongzhigao@pingcap.com>
Signed-off-by: Tong Zhigao tongzhigao@pingcap.com
What have you changed? (mandatory)
optimize_filters_for_hits
of RocksDB intocf_config
.default
cf is used to store kv data which could be determined whether really exists by upper logic instead of bloom filters.optimize_filters_for_hits
is setted true fordefault
cf by default.What are the type of the changes? (mandatory)
How has this PR been tested? (mandatory)
Benchmark result if necessary (optional)
cgroup
to limit memory or disable block cache, the result show that the improvement is little.max-open-files=-1
and setblock-cache-size
to a large value in order to test the situation thatdefault
cf store all data in memory.go-ycsb
:optimize_filters_for_hits=true
is about up to 15% less.