Port MDEV-156. Threadpool - add thd_wait_begin/thd_wait_end to the network IO functions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
|||
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
Medium
|
Sergei Glushchenko | ||
5.1 |
Invalid
|
Undecided
|
Unassigned | ||
5.5 |
Won't Fix
|
Medium
|
Unassigned | ||
5.6 |
Fix Released
|
Medium
|
Sergei Glushchenko |
Bug Description
Port MDEV-156 from MariaDB (threadpool improvement)
Certain types of workloads (large result sets, blobs, slow clients) can have longer waits on network io (socket reads and writes). Whenever server waits, this should be communicated to the threadpool, so it can start new query by either waking a waiting thread or sometimes creating a new one. IF threadpool does not know about blocking state of a thread, the performance will degrade.
In MySQL prior to 5.6 it is not possible to know whether socket read or write would wait. In 5.6, socket handling on Unixes was changed in VIO. Sockets IO is always non-blocking and reads or writes that would block wait with poll() for operation to finish.
The task is to add thd_wait_
Related branches
- Laurynas Biveinis (community): Approve
- Vlad Lesin: Pending requested
-
Diff: 208 lines (+64/-12)8 files modifiedPercona-Server/include/mysql/plugin_audit.h.pp (+2/-1)
Percona-Server/include/mysql/plugin_auth.h.pp (+2/-1)
Percona-Server/include/mysql/plugin_ftparser.h.pp (+2/-1)
Percona-Server/include/mysql/service_thd_wait.h (+2/-1)
Percona-Server/include/violite.h (+3/-1)
Percona-Server/mysql-test/t/pool_of_threads.test (+2/-2)
Percona-Server/sql/scheduler.cc (+13/-0)
Percona-Server/vio/viosocket.c (+38/-5)
As the report suggests fixing this in server versions < 5.6 is not feasible (and it was only fixed in MariaDB 10.0).