Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Fix
Description
Description:
|
------------
|
To avoide too many concurrency threads,InnoDB use
|
innodb_thread_concurrency to control the number of operating system
|
threads concurrently inside InnoDB. When a thread is permitted to
|
enter InnoDB, it is given a number of "free tickets" equal to the
|
value of innodb_concurrency_tickets, and the thread can enter and
|
leave InnoDB freely until it has used up its tickets.
|
|
innodb_concurrency_tickets is a fixed number, and it is hard to
|
choose a proper value fit for both small transactions and large
|
transactons. With a small innodb_concurrency_tickets value, large
|
transactons will acquire tickets many times, which extends the length
|
of time required to complete their task. With a large
|
innodb_concurrency_tickets value, small transactons may get starved
|
by too many concurrent large transactions.
|
|
This patch provides a method to adaptively adjust tickets assigned to
|
readonly SELECT SQL statement. For large SELECT query, it may acquire
|
tickets many times if the previous assigned tickets are exhausted.
|
To avoid starving smally quries, the tickets assiged to large query are
|
decreased exponentially according to the number of times it acquire
|
tickets, i.e. the more times large query acquire tickets, the smaller
|
tickets it will be assigned. To avoid it getting a too small value,
|
innodb_rds_min_concurrency_tickets is used as the lower bound of the
|
tickets number assigned.
|
|
Two global InnoDB variables are added,
|
1. innodb_rds_adaptive_tickets_algo: control whether adaptive algorithm
|
is enabled.
|
2. innodb_rds_min_concurrency_tickets: the lower bound of tickets can
|
be assiged under adaptive adjusting.
|
https://github.com/alibaba/AliSQL/commit/e6abc82cddaae0f8dc63ef976f7662a40443de8b
Attachments
Issue Links
- relates to
-
MDEV-23379 Deprecate and ignore options for InnoDB concurrency throttling
- Closed