mysql-5.6 icon indicating copy to clipboard operation
mysql-5.6 copied to clipboard

What is the use case for cache_index_and_filter_with_high_priority?

Open mdcallag opened this issue 2 years ago • 1 comments

db_bench only exposes cache_high_pri_pool_ratio and enables cache_index_and_filter_with_high_priority when cache_high_pri_pool_ratio is greater than 0.

MyRocks exposes both, so you can enable cache_index_and_filter_with_high_priority while leaving cache_high_pri_pool_ratio at zero. That seems like a bad idea because at the best, RocksDB won't be doing what you think it should be doing and at the best, performance will suffer. I have been doing this wrong for at least a year with the my.cnf I use for perf tests.

$ bin/mysql -uroot -ppw -e 'show global variables' | grep -i high_pri
rocksdb_cache_high_pri_pool_ratio       0.000000
rocksdb_cache_index_and_filter_with_high_priority       ON

mdcallag avatar Nov 15 '21 17:11 mdcallag

I filed an issue for the root cause in RocksDB, issue 9169 but hope that MyRocks can fix this via a workaround as db_bench has done. In db_bench there is no option for with_high_priority, and internally it will set that when high_pri_pool_ratio is greater than 0 see here.

mdcallag avatar Nov 15 '21 17:11 mdcallag