ThreadPool: high priority queue mode in PS 5.5

Registered by Alexey Kopytov on 2013-12-03

High priority scheduling introduced in
controls whether statements executed by already started transactions go
into the high priority queue.

In some cases it is required to prioritize all statements for a specific
connection regardless of whether they are executed as a part of a
multi-statement transaction or in the autocommit mode. Or vice versa,
some connections may require using the low priority queue for all
statements unconditionally.

The goal of this blueprint is to implement a new system variable,
thread_pool_high_prio_mode, which allows more fine-grained control over
high priority scheduling either globally or per connection.

Blueprint information

Alexey Kopytov
Alexey Kopytov
Alexey Kopytov
Series goal:
Accepted for 5.5
Milestone target:
milestone icon 5.5.35-33.0
Started by
Alexey Kopytov on 2013-12-03
Completed by
Alexey Kopytov on 2013-12-16



thread_pool_high_prio_mode should accept the following values:

- “transactions” (the default). In this mode only statements from already
  started transactions may go into the high priority queue depending on
  the number of high priority tickets currently available in a
  connection (see thread_pool_high_prio_tickets);

- “statements”. In this mode all individual statements go into the high
  priority queue, regardless of connection’s transactional state and the
  number of available high priority tickets. This value can be used to
  prioritize AUTOCOMMIT transactions or other kinds of statements such as
  administrative ones for specific connections. Note that setting this
  value globally essentially disables high priority scheduling, since in
  this case all statements from all connections will use a single queue
  (the high priority one);

- “none”. This mode disables high priority queue for a connection. Some
  connections (e.g. monitoring) may be insensitive to execution latency
  and/or never allocate any server resources that would otherwise impact
  performance in other connections and thus, do not really require high
  priority scheduling. Note that setting thread_pool_high_prio_mode to
  “none” globally has essentially the same effect as setting it to
  “statements” globally: all connections will always use a single queue
  (the low priority one in this case).


Work Items

This blueprint contains Public information 
Everyone can see this information.


No subscribers.