Skip to content

CPU overhead from "Disable concurrency ticket when ACL CACHE lock is acquired in exclusive mode" reduces scan throughput a lot #1506

@mdcallag

Description

@mdcallag

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions