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

Rdb_iterator_base::setup_scan_iterator consumed too much time

rockeet opened this issue · comments

Rdb_iterator_base::setup_scan_iterator consumed too much time.

sysbench select_random_ranges run  --simple_ranges=10 --table_size=1000000 \
         --time=600 --db-driver=mysql --threads=50 \
         --mysql-host=**** --mysql-user=****  --mysql-password=**** --mysql-db=**** \
         --mysql_storage_engine='rocksdb default charset latin1'

I think properly caching the Rdb_iterator should resolve this performance issue. Then I have tried to change the code to cache the Rdb_iterator in Rdb_transaction but failed(I'm not familiar with myrocks code).

Here is the overall flame graph:

image

Focus on handler::multi_range_read_next

image