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 "Disable concurrency ticket when ACL CACHE lock is acquired in exclusive mode" reduces scan throughput a lot #1506

Open
mdcallag opened this issue Nov 13, 2024 · 1 comment

Comments

@mdcallag
Copy link
Contributor

mdcallag commented Nov 13, 2024

The diff with the title Disable concurrency ticket when ACL CACHE lock is acquired in exclusive mode reduces scan throughput by 32% and 15% on the two servers where I tested it. The issue is new CPU overhead.

Scan throughput is tested via sysbench with a cached database and 1 thread (user, connection, etc).

The servers I used to test it are:

  • beelink - Beelink SER 4700u with Ryzen 7 4700u, 16G RAM
  • asus - ASUS ExpertCenter PN53 with AMD Ryzen 7 7735HS, 32G RAM

I ran sysbench with 1 table, 30M rows for beelink, 50M rows for asus and the table scan query is done in a loop so that scans run for 5+ minutes.

When I compare builds with and without the diff using git sha b72c7e5 as is (with the diff) and with the new code removed from skip_concurrency_ticket (without the diff) throughput improves by ~32% on beelink and by ~15% on asus. One difference between beelink and asus is that asus has a newer & faster CPU.

The scan query is written like this to avoid finding rows to return, no rows match the WHERE clause:
SELECT * from $table WHERE LENGTH(c) < 0

@mdcallag
Copy link
Contributor Author

Attached flame graphs show the new CPU overhead in skip_concurrency_ticket and its children. I compare MyRocks 8.0.32 from 24/05/29 at git sha 49b37df (doesn't have the problem) with MyRocks from 24/10/23 at git sha b72c7e5. These flame graphs (*.svg files) are from the beelink server.

240529_49b37dfe beelink 1thread

241023_b72c7e5f beelink 1thread

@mdcallag mdcallag changed the title CPU overhead from "Disable concurrency ticket when ACL CACHE lock is acquired in exclusive mode" reduces scan throughput by ~10% CPU overhead from "Disable concurrency ticket when ACL CACHE lock is acquired in exclusive mode" reduces scan throughput a lot Nov 13, 2024
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