Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU overhead from JOIN::join_free is about 2X larger with MyRocks than with InnoDB #1485

Open
mdcallag opened this issue Aug 7, 2024 · 0 comments

Comments

@mdcallag
Copy link
Contributor

mdcallag commented Aug 7, 2024

I am looking at flamegraphs from sysbench with a cached database and 1 client. A common problem I see is that the percentage of samples that JOIN::join_free and its callees accounts for is ~2X larger in MyRocks than in InnoDB with simple microbenchmarks.

From the range-covered-pk.range100 microbenchmark (covered range query of PK index) the percentage of samples is 0.90% for InnoDB and 2.18% for MyRocks

JOIN::join_free from InnoDB:

0.90%  JOIN::join_free
  0.72%  mysql_unlock_read_tables
    0.70%  unlock_external
      0.68%  handler::ha_external_lock
        0.62% ha_innobase::external_lock
          0.50% innobase_commit

And from MyRocks

2.18%  JOIN::join_free
  1.22%  JOIN::cleanup
    1.15%  cleanup_table
      1.09%  ha_rocksdb::index_end
        ... destructors - some MyRocks and many more RocksDB class instances
  0.88%  mysql_unlock_read_tables
    0.85%  unlock_external
      0.81%  handler::ha_external_lock
        0.75%  ha_rocksdb::external_lock
          0.70%  Rdb_transaction::commit
            0.66%  Rdb_transaction_impl::rollback
               ...

Flamegraphs
sb perf g range-covered-pk range100 pk1 all

sb perf g range-covered-pk range100 pk1 all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant