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 lock_tables is about 2X larger for MyRocks than for InnoDB #1484

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 lock_tables (and its callees) accounts for is ~2X larger in MyRocks than in InnoDB with simple microbenchmarks.

Using results from the insert microbenchmark, for InnoDB

1.58% -> lock_tables
  1.13% -> mysql_lock_tables
    0.35% -> get_lock-data
    0.45% -> handler::ha_external_lock

And from MyRocks

2.89% -> lock_tables
  2.51% -> mysql_lock_tables
    2.09% -> handler::ha_external_lock
      1.81% -> ha_rocksdb::external_lock
        1.31% -> myrocks::get_or_create_tx
          1.17% -> Rdb_transaction_impl::start_tx
            0.91% -> rocksdb::WriteCommittedTxnDB::BeginTransaction
              0.80% -> rocksdb::PessimisticTransaction::Reinitialize

The flamegraphs are attached:
sb perf g insert range100 pk1 all
sb perf g insert 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