From 20928e2e960454ff7f9dee0094a464b1a6fdb195 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Wed, 13 Mar 2019 06:02:08 +0400 Subject: MDEV-14984 - regression in connect performance Removed redundant plugin_thdvar_cleanup() from end_connection(): called by THD::free_connection(), which always follows end_connection(). Saves at least one lock(LOCK_plugin) and one rdlock(LOCK_system_variables_hash). Benchmarked on a 2socket/20core/40threads Broadwell system using sysbench connect brencmark @40 threads (with select 1 disabled). 10.2 shows moderate improvement: 136219.93 -> 137766.31 CPS. 10.3 is improvement is somewhat better: 93018.29 -> 101379.77 CPS. Also backported MyRocks memory leak fix from 10.4, which turned out to be unrelated. --- sql/sql_connect.cc | 1 - 1 file changed, 1 deletion(-) (limited to 'sql/sql_connect.cc') diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc index 278677b8b2d..d7b388e310f 100644 --- a/sql/sql_connect.cc +++ b/sql/sql_connect.cc @@ -1122,7 +1122,6 @@ void end_connection(THD *thd) } thd->wsrep_client_thread= 0; #endif - plugin_thdvar_cleanup(thd); if (thd->user_connect) { -- cgit v1.2.1