From e3f0690d9bff930075ff644c8abeadddbc59bade Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Jan 2006 15:20:56 +0300 Subject: 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). innobase/include/srv0srv.h: Remove SRV_CONCURRENCY_THRESHOLD. The magic value is 0 from now on. innobase/srv/srv0srv.c: Remove SRV_CONCURRENCY_THRESHOLD. The magic value is 0 from now on. mysql-test/r/innodb.result: innodb_thread_concurrency is 0..1000 now, and the default is 0. mysql-test/t/innodb.test: innodb_thread_concurrency is 0..1000 now. sql/ha_innodb.cc: Remove SRV_CONCURRENCY_THRESHOLD. The magic value is 0 from now on. sql/mysqld.cc: innodb_thread_concurrency is 0..1000 now, and 0 (the default) disables the thread throttling. --- innobase/srv/srv0srv.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'innobase/srv') 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; } -- cgit v1.2.1