Merge lp:~hrvojem/percona-server/bug1154954-5.6 into lp:percona-server/5.6

Proposed by Hrvoje Matijakovic
Status: Merged
Approved by: Alexey Kopytov
Approved revision: 326
Merged at revision: 327
Proposed branch: lp:~hrvojem/percona-server/bug1154954-5.6
Merge into: lp:percona-server/5.6
Diff against target: 235 lines (+0/-113)
1 file modified
doc/source/performance/threadpool.rst (+0/-113)
To merge this branch: bzr merge lp:~hrvojem/percona-server/bug1154954-5.6
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+156547@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote :

Hm, I don't see fixes for Bug #1154954 and Bug #1154957 in the diff?

review: Needs Fixing
Revision history for this message
Alexey Kopytov (akopytov) wrote :

Bug #1154954 and Bug #1154957 are not applicable to 5.6. Was just confused with a reference in revision comments.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'doc/source/performance/threadpool.rst'
2--- doc/source/performance/threadpool.rst 1970-01-01 00:00:00 +0000
3+++ doc/source/performance/threadpool.rst 2013-04-02 13:14:23 +0000
4@@ -0,0 +1,113 @@
5+.. _threadpool:
6+
7+=============
8+ Thread Pool
9+=============
10+
11+.. note::
12+
13+ This feature implementation is considered BETA quality.
14+
15+|MySQL| executes statements using one thread per client connection. Once the number of connections increases past a certain point performance will degrade.
16+
17+This feature enables the server to keep the top performance even with large number of client connections by introducing a dynamic thread pool. By using the thread pool server would decrease the number of threads, which will then reduce the context switching and hot locks contentions. Using the thread pool will have the most effect with ``OLTP`` workloads (relatively short CPU-bound queries).
18+
19+In order to enable the thread pool variable :variable:`thread_handling` should be set up to ``pool-of-threads`` value. This can be done by adding: ::
20+
21+ thread_handling=pool-of-threads
22+
23+to the |MySQL| configuration file :file:`my.cnf`.
24+
25+Although the default values for the thread pool should provide good performance, additional `tuning <https://kb.askmonty.org/en/threadpool-in-55/#optimizing-server-variables-on-unix>`_ can be performed with the dynamic system variables described below.
26+
27+.. note::
28+
29+ Current implementation of the thread pool is built in the server, unlike the upstream version which is implemented as a plugin. Another significant implementation difference is that this implementation doesn't try to minimize the number of concurrent transactions like the ``MySQL Enterprise Threadpool``. Because of these things this implementation isn't compatible with the upstream one.
30+
31+Version Specific Information
32+============================
33+
34+ * :rn:`5.6.10-60.2`
35+ ``Thread Pool`` feature implemented. This feature was ported from |MariaDB|.
36+
37+System Variables
38+================
39+
40+.. variable:: thread_pool_idle_timeout
41+
42+ :cli: Yes
43+ :conf: Yes
44+ :scope: Global
45+ :dyn: Yes
46+ :vartype: Numeric
47+ :default: 60 (seconds)
48+
49+This variable can be used to limit the time an idle thread should wait before exiting.
50+
51+.. variable:: thread_pool_max_threads
52+
53+ :cli: Yes
54+ :conf: Yes
55+ :scope: Global
56+ :dyn: Yes
57+ :vartype: Numeric
58+ :default: 500
59+
60+This variable can be used to limit the maximum number of threads in the pool. Once this number is reached no new threads will be created.
61+
62+.. variable:: thread_pool_oversubscribe
63+
64+ :cli: Yes
65+ :conf: Yes
66+ :scope: Global
67+ :dyn: Yes
68+ :vartype: Numeric
69+ :default: 3
70+
71+The higher the value of this parameter the more threads can be run at the same time, if the values is lower than ``3`` it could lead to more sleeps and wake-ups.
72+
73+.. variable:: thread_pool_size
74+
75+ :cli: Yes
76+ :conf: Yes
77+ :scope: Global
78+ :dyn: Yes
79+ :vartype: Numeric
80+ :default: Number of processors
81+
82+This variable can be used to define the number of threads that can use the CPU at the same time.
83+
84+.. variable:: thread_pool_stall_limit
85+
86+ :cli: Yes
87+ :conf: Yes
88+ :scope: Global
89+ :dyn: No
90+ :vartype: Numeric
91+ :default: 500 (ms)
92+
93+The number of milliseconds before a running thread is considered stalled. When this limit is reached thread pool will wake up or create another thread. This is being used to prevent a long-running query from monopolizing the pool.
94+
95+Status Variables
96+=====================
97+
98+.. variable:: Threadpool_idle_threads
99+
100+ :cli: Yes
101+ :vartype: Numeric
102+
103+This status variable shows the number of idle threads in the pool.
104+
105+.. variable:: Threadpool_threads
106+
107+ :cli: Yes
108+ :vartype: Numeric
109+
110+This status variable shows the number of threads in the pool.
111+
112+Other Reading
113+=============
114+
115+ * `Thread pool in MariaDB 5.5 <https://kb.askmonty.org/en/threadpool-in-55/>`_
116+
117+ * `Thread pool implementation in Oracle MySQL <http://mikaelronstrom.blogspot.com/2011_10_01_archive.html>`_
118
119=== removed file 'doc/source/performance/threadpool.rst'
120--- doc/source/performance/threadpool.rst 2013-03-08 14:29:35 +0000
121+++ doc/source/performance/threadpool.rst 1970-01-01 00:00:00 +0000
122@@ -1,113 +0,0 @@
123-.. _threadpool:
124-
125-=============
126- Thread Pool
127-=============
128-
129-.. note::
130-
131- This feature implementation is considered BETA quality.
132-
133-|MySQL| executes statements using one thread per client connection. Once the number of connections increases past a certain point performance will degrade.
134-
135-This feature enables the server to keep the top performance even with large number of client connections by introducing a dynamic thread pool. By using the thread pool server would decrease the number of threads, which will then reduce the context switching and hot locks contentions. Using the thread pool will have the most effect with ``OLTP`` workloads (relatively short CPU-bound queries).
136-
137-In order to enable the thread pool variable :variable:`thread_handling` should be set up to ``pool-of-threads`` value. This can be done by adding: ::
138-
139- thread_handling=pool-of-threads
140-
141-to the |MySQL| configuration file :file:`my.cnf`.
142-
143-Although the default values for the thread pool should provide good performance, additional `tuning <https://kb.askmonty.org/en/threadpool-in-55/#optimizing-server-variables-on-unix>`_ can be performed with the dynamic system variables described below.
144-
145-.. note::
146-
147- Current implementation of the thread pool is built in the server, unlike the upstream version which is implemented as a plugin. Another significant implementation difference is that this implementation doesn't try to minimize the number of concurrent transactions like the ``MySQL Enterprise Threadpool``. Because of these things this implementation isn't compatible with the upstream one.
148-
149-Version Specific Information
150-============================
151-
152- * :rn:`5.6.10-60.2`
153- ``Thread Pool`` feature implemented. This feature was ported from |MariaDB|.
154-
155-System Variables
156-================
157-
158-.. variable:: thread_pool_idle_timeout
159-
160- :cli: Yes
161- :conf: Yes
162- :scope: Global
163- :dyn: Yes
164- :vartype: Numeric
165- :default: 60 (seconds)
166-
167-This variable can be used to limit the time an idle thread should wait before exiting.
168-
169-.. variable:: thread_pool_max_threads
170-
171- :cli: Yes
172- :conf: Yes
173- :scope: Global
174- :dyn: Yes
175- :vartype: Numeric
176- :default: 500
177-
178-This variable can be used to limit the maximum number of threads in the pool. Once this number is reached no new threads will be created.
179-
180-.. variable:: thread_pool_oversubscribe
181-
182- :cli: Yes
183- :conf: Yes
184- :scope: Global
185- :dyn: Yes
186- :vartype: Numeric
187- :default: 3
188-
189-The higher the value of this parameter the more threads can be run at the same time, if the values is lower than ``3`` it could lead to more sleeps and wake-ups.
190-
191-.. variable:: thread_pool_size
192-
193- :cli: Yes
194- :conf: Yes
195- :scope: Global
196- :dyn: Yes
197- :vartype: Numeric
198- :default: Number of processors
199-
200-This variable can be used to define the number of threads that can use the CPU at the same time.
201-
202-.. variable:: thread_pool_stall_limit
203-
204- :cli: Yes
205- :conf: No
206- :scope: Global
207- :dyn: No
208- :vartype: Numeric
209- :default: 500 (ms)
210-
211-The number of milliseconds before a running thread is considered stalled. When this limit is reached thread pool will wake up or create another thread. This is being used to prevent a long-running query from monopolizing the pool.
212-
213-Status Variables
214-=====================
215-
216-.. variable:: Threadpool_idle_threads
217-
218- :cli: Yes
219- :vartype: Numeric
220-
221-This status variable shows the number of idle threads in the pool.
222-
223-.. variable:: Threadpool_threads
224-
225- :cli: Yes
226- :vartype: Numeric
227-
228-This status variable shows the number of threads in the pool.
229-
230-Other Reading
231-=============
232-
233- * `Thread pool in MariaDB 5.5 <https://kb.askmonty.org/en/threadpool-in-55/>`_
234-
235- * `Thread pool implementation in Oracle MySQL <http://mikaelronstrom.blogspot.com/2011_10_01_archive.html>`_

Subscribers

People subscribed via source and target branches