Skip to content

Commit bbd70fc

Browse files
committed
MDEV-23379 Deprecate&ignore InnoDB concurrency throttling parameters
The parameters innodb_thread_concurrency and innodb_commit_concurrency were useful years ago when both computing resources and the implementation of some shared data structures were limited. MySQL 5.0 or 5.1 had trouble scaling beyond 8 concurrent connections. Most of the scalability bottlenecks have been removed since then, and the transactions per second delivered by MariaDB Server 10.5 should not dramatically drop upon exceeding the 'optimal' number of connections. Hence, enabling any concurrency throttling for InnoDB actually makes things worse. We have seen many customers mistakenly setting this to a small value like 16 or 64 and then complaining the server was slow. Ignoring the parameters allows us to remove some normally unused code and data structures, which could slightly improve performance. innodb_thread_concurrency, innodb_commit_concurrency, innodb_replication_delay, innodb_concurrency_tickets, innodb_thread_sleep_delay, innodb_adaptive_max_sleep_delay: Deprecate and ignore; hard-wire to 0. The column INFORMATION_SCHEMA.INNODB_TRX.trx_concurrency_tickets will always report 0.
1 parent 7438fc4 commit bbd70fc

39 files changed

+345
-1170
lines changed

extra/mariabackup/xtrabackup.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5376,7 +5376,6 @@ static bool xtrabackup_prepare_func(char** argv)
53765376
xb_filters_init();
53775377

53785378
srv_log_group_home_dir = NULL;
5379-
srv_thread_concurrency = 1;
53805379

53815380
if (xtrabackup_incremental) {
53825381
srv_operation = SRV_OPERATION_RESTORE_DELTA;

mysql-test/include/mix1.inc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,10 +1183,6 @@ set @my_innodb_autoextend_increment=@@global.innodb_autoextend_increment;
11831183
set global innodb_autoextend_increment=8;
11841184
set global innodb_autoextend_increment=@my_innodb_autoextend_increment;
11851185

1186-
set @my_innodb_commit_concurrency=@@global.innodb_commit_concurrency;
1187-
set global innodb_commit_concurrency=0;
1188-
set global innodb_commit_concurrency=@my_innodb_commit_concurrency;
1189-
11901186
#
11911187
# Bug #37830: ORDER BY ASC/DESC - no difference
11921188
#

mysql-test/suite/innodb/r/innodb_buffer_pool_resize_debug.result

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
set global innodb_file_per_table=ON;
2-
set global innodb_thread_concurrency=20;
32
connect con1,localhost,root,,;
43
connect con2,localhost,root,,;
54
connect con3,localhost,root,,;

mysql-test/suite/innodb/r/innodb_bug42101-nonzero.result

Lines changed: 0 additions & 26 deletions
This file was deleted.

mysql-test/suite/innodb/r/innodb_bug42101.result

Lines changed: 0 additions & 22 deletions
This file was deleted.

mysql-test/suite/innodb/r/innodb_mysql.result

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1797,9 +1797,6 @@ DROP TABLE t1;
17971797
set @my_innodb_autoextend_increment=@@global.innodb_autoextend_increment;
17981798
set global innodb_autoextend_increment=8;
17991799
set global innodb_autoextend_increment=@my_innodb_autoextend_increment;
1800-
set @my_innodb_commit_concurrency=@@global.innodb_commit_concurrency;
1801-
set global innodb_commit_concurrency=0;
1802-
set global innodb_commit_concurrency=@my_innodb_commit_concurrency;
18031800
CREATE TABLE t1 (a int, b int, c int, PRIMARY KEY (a), KEY t1_b (b))
18041801
ENGINE=InnoDB;
18051802
INSERT INTO t1 (a,b,c) VALUES (1,1,1), (2,1,1), (3,1,1), (4,1,1);

mysql-test/suite/innodb/t/innodb.test

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ call mtr.add_suppression("Cannot add field .* in table .* because after adding i
2424
call mtr.add_suppression("\\[ERROR\\] InnoDB: in ALTER TABLE `test`.`t1`");
2525
call mtr.add_suppression("\\[ERROR\\] InnoDB: in RENAME TABLE table `test`.`t1`");
2626

27-
SET @innodb_thread_sleep_delay_orig = @@innodb_thread_sleep_delay;
28-
29-
SET @innodb_thread_concurrency_orig = @@innodb_thread_concurrency;
30-
3127
--disable_warnings
3228
SET @innodb_rows_deleted_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted');
3329
SET @innodb_rows_inserted_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted');
@@ -2503,9 +2499,6 @@ DROP TABLE bug35537;
25032499
DISCONNECT c1;
25042500
CONNECTION default;
25052501

2506-
SET GLOBAL innodb_thread_sleep_delay = @innodb_thread_sleep_delay_orig;
2507-
SET GLOBAL innodb_thread_concurrency = @innodb_thread_concurrency_orig;
2508-
25092502
-- enable_query_log
25102503

25112504
# Clean up after the Bug#55284/Bug#58912 test case.

mysql-test/suite/innodb/t/innodb_buffer_pool_resize_debug.test

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
--disable_query_log
1010
set @old_innodb_buffer_pool_size = @@innodb_buffer_pool_size;
1111
set @old_innodb_file_per_table = @@innodb_file_per_table;
12-
set @old_innodb_thread_concurrency = @@innodb_thread_concurrency;
13-
set @old_innodb_thread_sleep_delay = @@innodb_thread_sleep_delay;
1412
set @old_innodb_disable_resize = @@innodb_disable_resize_buffer_pool_debug;
1513
set global innodb_disable_resize_buffer_pool_debug = OFF;
1614
call mtr.add_suppression("\\[ERROR\\] InnoDB: failed to allocate memory for buffer pool chunk");
@@ -22,7 +20,6 @@ call mtr.add_suppression("\\[ERROR\\] InnoDB: failed to allocate memory for buff
2220
let $wait_timeout = 180;
2321

2422
set global innodb_file_per_table=ON;
25-
set global innodb_thread_concurrency=20;
2623

2724
connect (con1,localhost,root,,);
2825
connect (con2,localhost,root,,);
@@ -178,8 +175,6 @@ drop table t6;
178175
--disable_query_log
179176
set global innodb_buffer_pool_size = @old_innodb_buffer_pool_size;
180177
set global innodb_file_per_table = @old_innodb_file_per_table;
181-
set global innodb_thread_concurrency = @old_innodb_thread_concurrency;
182-
set global innodb_thread_sleep_delay = @old_innodb_thread_sleep_delay;
183178
set global innodb_disable_resize_buffer_pool_debug = @old_innodb_disable_resize;
184179
--enable_query_log
185180

mysql-test/suite/innodb/t/innodb_bug42101-nonzero-master.opt

Lines changed: 0 additions & 1 deletion
This file was deleted.

mysql-test/suite/innodb/t/innodb_bug42101-nonzero.test

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)