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:
@@ -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
|
Reference in New Issue
Block a user