summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authoraivanov@mysql.com <>2006-01-18 15:20:56 +0300
committeraivanov@mysql.com <>2006-01-18 15:20:56 +0300
commit5f7279d0d50b406add0bf141df6341114e8e30c9 (patch)
tree3b690b43dc0aa84a0dd3eea5a7d5d92d804409a8 /innobase
parentaf9d6bcf830e0f0fee11aa8bd9f8a447524a008f (diff)
downloadmariadb-git-5f7279d0d50b406add0bf141df6341114e8e30c9.tar.gz
Applied patch recieved from Marko:
Make innodb_thread_concurrency 0 by default, and extend the usable range from 0 to 1000 (0 disables the thread throttling).
Diffstat (limited to 'innobase')
-rw-r--r--innobase/include/srv0srv.h1
-rw-r--r--innobase/srv/srv0srv.c9
2 files changed, 5 insertions, 5 deletions
diff --git a/innobase/include/srv0srv.h b/innobase/include/srv0srv.h
index 23c9ef1e221..f379efa98eb 100644
--- a/innobase/include/srv0srv.h
+++ b/innobase/include/srv0srv.h
@@ -195,7 +195,6 @@ extern mutex_t* kernel_mutex_temp;/* mutex protecting the server, trx structs,
#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 */
diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c
index 694345c4142..fe9e08d65be 100644
--- a/innobase/srv/srv0srv.c
+++ b/innobase/srv/srv0srv.c
@@ -258,9 +258,10 @@ threads waiting for locks are not counted into the number because otherwise
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
@@ -1141,7 +1142,7 @@ srv_conc_force_enter_innodb(
trx_t* trx) /* in: transaction object associated with the
thread */
{
- if (srv_thread_concurrency >= SRV_CONCURRENCY_THRESHOLD) {
+ if (UNIV_LIKELY(!srv_thread_concurrency)) {
return;
}
@@ -1167,7 +1168,7 @@ srv_conc_force_exit_innodb(
{
srv_conc_slot_t* slot = NULL;
- if (srv_thread_concurrency >= SRV_CONCURRENCY_THRESHOLD) {
+ if (UNIV_LIKELY(!srv_thread_concurrency)) {
return;
}