You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Feature] Issue#9: PROVIDE ADAPTIVE ALGORITHM FOR INNODB CONCURRENCY TICKETS
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.
0 commit comments