1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Fix for bug#12695572 - "IMPROVE MDL PERFORMANCE IN PRE-VISTA

BY CACHING OR REDUCING CREATEEVENT CALLS".
 
5.5 versions of MySQL server performed worse than 5.1 versions 
under single-connection workload in autocommit mode on Windows XP.
 
Part of this slowdown can be attributed to overhead associated
with constant creation/destruction of MDL_lock objects in the MDL
subsystem. The problem is that creation/destruction of these
objects causes creation and destruction of associated
synchronization primitives, which are expensive on Windows XP.
 
This patch tries to alleviate this problem by introducing a cache
of unused MDL_object_lock objects. Instead of destroying such
objects we put them into the cache and then reuse with a new
key when creation of a new object is requested.

To limit the size of this cache, a new --metadata-locks-cache-size
start-up parameter was introduced.
This commit is contained in:
Dmitry Lenev
2011-11-15 22:00:14 +04:00
parent e5aa632cc6
commit 02e1d6e606
9 changed files with 297 additions and 45 deletions

View File

@@ -0,0 +1,21 @@
#
# Check that the paremeter is correctly set by start-up
# option (.opt file sets it to 256 while default is 1024).
select @@global.metadata_locks_cache_size = 256;
@@global.metadata_locks_cache_size = 256
1
#
# Check that variable is read only
#
set @@global.metadata_locks_cache_size= 1024;
ERROR HY000: Variable 'metadata_locks_cache_size' is a read only variable
select @@global.metadata_locks_cache_size = 256;
@@global.metadata_locks_cache_size = 256
1
#
# And only GLOBAL
#
select @@session.metadata_locks_cache_size;
ERROR HY000: Variable 'metadata_locks_cache_size' is a GLOBAL variable
set @@session.metadata_locks_cache_size= 1024;
ERROR HY000: Variable 'metadata_locks_cache_size' is a read only variable