Below is the list of changes that have just been committed into a local
5.0 repository of marko. When marko does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1949 05/09/13 16:39:04 marko@stripped +6 -0
Make innodb_thread_concurrency 0 by default, and extend the useable
range from 0 to 1000 (0 disables the thread throttling).
sql/mysqld.cc
1.496 05/09/13 16:38:53 marko@stripped +4 -2
innodb_thread_concurrency is 0..1000 now, and 0 (the default)
disables the thread throttling.
sql/ha_innodb.cc
1.256 05/09/13 16:38:52 marko@stripped +2 -2
Remove SRV_CONCURRENCY_THRESHOLD. The magic value is 0 from now on.
mysql-test/t/innodb.test
1.108 05/09/13 16:38:52 marko@stripped +1 -1
innodb_thread_concurrency is 0..1000 now
mysql-test/r/innodb.result
1.134 05/09/13 16:38:52 marko@stripped +3 -3
innodb_thread_concurrency is 0..1000 now, and the default is 0
innobase/srv/srv0srv.c
1.94 05/09/13 16:38:52 marko@stripped +5 -4
Remove SRV_CONCURRENCY_THRESHOLD. The magic value is 0 from now on.
innobase/include/srv0srv.h
1.57 05/09/13 16:38:52 marko@stripped +0 -1
Remove SRV_CONCURRENCY_THRESHOLD. The magic value is 0 from now on.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: marko
# Host: hundin.mysql.fi
# Root: /home/marko/mysql-5.0-clone
--- 1.495/sql/mysqld.cc 2005-09-06 21:20:14 +03:00
+++ 1.496/sql/mysqld.cc 2005-09-13 16:38:53 +03:00
@@ -5335,9 +5335,11 @@
(gptr*) &srv_n_spin_wait_rounds,
0, GET_LONG, REQUIRED_ARG, 20L, 0L, ~0L, 0, 1L, 0},
{"innodb_thread_concurrency", OPT_INNODB_THREAD_CONCURRENCY,
- "Helps in performance tuning in heavily concurrent environments.",
+ "Helps in performance tuning in heavily concurrent environments. "
+ "Sets the maximum number of threads allowed inside InnoDB. Value 0"
+ " will disable the thread throttling.",
(gptr*) &srv_thread_concurrency, (gptr*) &srv_thread_concurrency,
- 0, GET_LONG, REQUIRED_ARG, 20, 1, 1000, 0, 1, 0},
+ 0, GET_LONG, REQUIRED_ARG, 0, 0, 1000, 0, 1, 0},
{"innodb_commit_concurrency", OPT_INNODB_THREAD_CONCURRENCY,
"Helps in performance tuning in heavily concurrent environments.",
(gptr*) &srv_commit_concurrency, (gptr*) &srv_commit_concurrency,
--- 1.56/innobase/include/srv0srv.h 2005-08-11 19:01:35 +03:00
+++ 1.57/innobase/include/srv0srv.h 2005-09-13 16:38:52 +03:00
@@ -183,7 +183,6 @@
#define kernel_mutex (*kernel_mutex_temp)
#define SRV_MAX_N_IO_THREADS 100
-#define SRV_CONCURRENCY_THRESHOLD 20
/* Array of English strings describing the current state of an
i/o handler thread */
--- 1.93/innobase/srv/srv0srv.c 2005-08-12 11:39:58 +03:00
+++ 1.94/innobase/srv/srv0srv.c 2005-09-13 16:38:52 +03:00
@@ -258,9 +258,10 @@
we could get a deadlock. MySQL creates a thread for each user session, and
semaphore contention and convoy problems can occur withput this restriction.
Value 10 should be good if there are less than 4 processors + 4 disks in the
-computer. Bigger computers need bigger values. */
+computer. Bigger computers need bigger values. Value 0 will disable the
+concurrency check. */
-ulong srv_thread_concurrency = SRV_CONCURRENCY_THRESHOLD;
+ulong srv_thread_concurrency = 0;
ulong srv_commit_concurrency = 0;
os_fast_mutex_t srv_conc_mutex; /* this mutex protects srv_conc data
@@ -1129,7 +1130,7 @@
trx_t* trx) /* in: transaction object associated with the
thread */
{
- if (srv_thread_concurrency >= SRV_CONCURRENCY_THRESHOLD) {
+ if (UNIV_LIKELY(!srv_thread_concurrency)) {
return;
}
@@ -1155,7 +1156,7 @@
{
srv_conc_slot_t* slot = NULL;
- if (srv_thread_concurrency >= SRV_CONCURRENCY_THRESHOLD) {
+ if (UNIV_LIKELY(!srv_thread_concurrency)) {
return;
}
--- 1.133/mysql-test/r/innodb.result 2005-09-13 01:44:44 +03:00
+++ 1.134/mysql-test/r/innodb.result 2005-09-13 16:38:52 +03:00
@@ -1812,15 +1812,15 @@
innodb_sync_spin_loops 20
show variables like "innodb_thread_concurrency";
Variable_name Value
-innodb_thread_concurrency 20
-set global innodb_thread_concurrency=1000;
+innodb_thread_concurrency 0
+set global innodb_thread_concurrency=1001;
show variables like "innodb_thread_concurrency";
Variable_name Value
innodb_thread_concurrency 1000
set global innodb_thread_concurrency=0;
show variables like "innodb_thread_concurrency";
Variable_name Value
-innodb_thread_concurrency 1
+innodb_thread_concurrency 0
set global innodb_thread_concurrency=16;
show variables like "innodb_thread_concurrency";
Variable_name Value
--- 1.107/mysql-test/t/innodb.test 2005-09-12 16:58:29 +03:00
+++ 1.108/mysql-test/t/innodb.test 2005-09-13 16:38:52 +03:00
@@ -1309,7 +1309,7 @@
# Test for innodb_thread_concurrency variable
show variables like "innodb_thread_concurrency";
-set global innodb_thread_concurrency=1000;
+set global innodb_thread_concurrency=1001;
show variables like "innodb_thread_concurrency";
set global innodb_thread_concurrency=0;
show variables like "innodb_thread_concurrency";
--- 1.255/sql/ha_innodb.cc 2005-09-06 14:38:17 +03:00
+++ 1.256/sql/ha_innodb.cc 2005-09-13 16:38:52 +03:00
@@ -334,7 +334,7 @@
/*=========================*/
trx_t* trx) /* in: transaction handle */
{
- if (UNIV_LIKELY(srv_thread_concurrency >= SRV_CONCURRENCY_THRESHOLD)) {
+ if (UNIV_LIKELY(!srv_thread_concurrency)) {
return;
}
@@ -351,7 +351,7 @@
/*========================*/
trx_t* trx) /* in: transaction handle */
{
- if (UNIV_LIKELY(srv_thread_concurrency >= SRV_CONCURRENCY_THRESHOLD)) {
+ if (UNIV_LIKELY(!srv_thread_concurrency)) {
return;
}
| Thread |
|---|
| • bk commit into 5.0 tree (marko:1.1949) | Marko Mäkelä | 13 Sep |