Skip to content
This repository was archived by the owner on Mar 1, 2026. It is now read-only.
This repository was archived by the owner on Mar 1, 2026. It is now read-only.

Rdb_iterator_base::setup_scan_iterator consumed too much time #1219

Description

@rockeet

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions