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.

MyRocks has more overhead from memcpy and malloc on range scans vs InnoDB #150

Description

@mdcallag

MyRocks has much more overhead for _memcpy_ssse3_back, free, malloc on q2 as explained in #148. InnoDB gets ~1.35X more QPS than MyRocks.

Flat linux perf CPU profiles

From InnoDB

     4.06%  mysqld               [.] MYSQLparse
     2.78%  mysqld               [.] rec_get_offsets_func
     2.53%  mysqld               [.] page_rec_get_n_recs_before
     1.63%  libc-2.17.so         [.] __memcpy_ssse3_back
     1.41%  mysqld               [.] my_hash_sort_bin
     1.28%  mysqld               [.] row_search_for_mysql
     1.18%  mysqld               [.] buf_page_get_gen
     0.99%  mysqld               [.] find_keyword
     0.96%  mysqld               [.] JOIN::optimize
     0.90%  mysqld               [.] make_join_statistics
     0.86%  mysqld               [.] cmp_dtuple_rec_with_match_low
     0.78%  mysqld               [.] page_cur_search_with_match
     0.75%  mysqld               [.] lex_one_token
     0.75%  mysqld               [.] free
     0.70%  mysqld               [.] btr_cur_search_to_nth_level
     0.64%  mysqld               [.] malloc
     0.61%  [kernel.kallsyms]    [k] fget_light
     0.58%  libpthread-2.17.so   [.] pthread_getspecific
     0.55%  libpthread-2.17.so   [.] __libc_recv
     0.55%  libc-2.17.so         [.] __memset_sse2
     0.49%  mysqld               [.] THD::enter_stage
     0.49%  mysqld               [.] row_sel_field_store_in_mysql_format_func

---

From MyRocks

     3.58%  mysqld.stat          [.] MYSQLparse
     2.80%  libc-2.17.so         [.] __memcpy_ssse3_back
     2.32%  mysqld.stat          [.] free
     2.24%  mysqld.stat          [.] malloc
     1.60%  mysqld.stat          [.] rocksdb::BlockIter::ParseNextKey
     1.17%  libc-2.17.so         [.] __memcmp_sse4_1
     1.00%  mysqld.stat          [.] rocksdb::BlockIter::BinarySeek
     0.94%  mysqld.stat          [.] rocksdb::InternalKeyComparator::Compare
     0.77%  mysqld.stat          [.] find_keyword
     0.74%  mysqld.stat          [.] rdb_perf_context_stop
     0.74%  mysqld.stat          [.] lex_one_token
     0.73%  mysqld.stat          [.] rocksdb::StatisticsImpl::recordTick
     0.70%  mysqld.stat          [.] make_join_statistics
     0.65%  mysqld.stat          [.] dispatch_command
     0.63%  libpthread-2.17.so   [.] pthread_mutex_unlock
     0.62%  mysqld.stat          [.] JOIN::optimize
     0.62%  mysqld.stat          [.] update_row_stats
     0.61%  libc-2.17.so         [.] __memset_sse2
     0.54%  libpthread-2.17.so   [.] __libc_recv
     0.51%  mysqld.stat          [.] rocksdb::DBIter::FindValueForCurrentKey
     0.44%  mysqld.stat          [.] mysql_execute_command
     0.44%  mysqld.stat          [.] rocksdb::MergingIterator::Prev

Metadata

Metadata

Assignees

No one assigned

    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