facebook / mysql-5.6

Facebook's branch of the Oracle MySQL database. This includes MyRocks.

Home Page:http://myrocks.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is the use case for cache_index_and_filter_with_high_priority?

mdcallag opened this issue · 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

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.