Commit c98a1dcc authored by calvin's avatar calvin

branches/zip: Mantis issue #197 - Make srv_spin_wait_delay configurable

New parameter innodb_spin_wait_delay to set the maximum delay between
polling for a spin lock. 5 is the default.

Approved by: Marko (on IM)
parent 55aa8dc0
...@@ -9640,6 +9640,11 @@ static MYSQL_SYSVAR_ULONG(sync_spin_loops, srv_n_spin_wait_rounds, ...@@ -9640,6 +9640,11 @@ static MYSQL_SYSVAR_ULONG(sync_spin_loops, srv_n_spin_wait_rounds,
"Count of spin-loop rounds in InnoDB mutexes", "Count of spin-loop rounds in InnoDB mutexes",
NULL, NULL, 20L, 0L, ~0L, 0); NULL, NULL, 20L, 0L, ~0L, 0);
static MYSQL_SYSVAR_ULONG(spin_wait_delay, srv_spin_wait_delay,
PLUGIN_VAR_OPCMDARG,
"Maximum delay between polling for a spin lock (5 by default)",
NULL, NULL, 5L, 0L, ~0L, 0);
static MYSQL_SYSVAR_ULONG(thread_concurrency, srv_thread_concurrency, static MYSQL_SYSVAR_ULONG(thread_concurrency, srv_thread_concurrency,
PLUGIN_VAR_RQCMDARG, PLUGIN_VAR_RQCMDARG,
"Helps in performance tuning in heavily concurrent environments. Sets the maximum number of threads allowed inside InnoDB. Value 0 will disable the thread throttling.", "Helps in performance tuning in heavily concurrent environments. Sets the maximum number of threads allowed inside InnoDB. Value 0 will disable the thread throttling.",
...@@ -9724,6 +9729,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { ...@@ -9724,6 +9729,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(strict_mode), MYSQL_SYSVAR(strict_mode),
MYSQL_SYSVAR(support_xa), MYSQL_SYSVAR(support_xa),
MYSQL_SYSVAR(sync_spin_loops), MYSQL_SYSVAR(sync_spin_loops),
MYSQL_SYSVAR(spin_wait_delay),
MYSQL_SYSVAR(table_locks), MYSQL_SYSVAR(table_locks),
MYSQL_SYSVAR(thread_concurrency), MYSQL_SYSVAR(thread_concurrency),
MYSQL_SYSVAR(thread_sleep_delay), MYSQL_SYSVAR(thread_sleep_delay),
......
...@@ -185,7 +185,7 @@ extern ibool srv_error_monitor_active; ...@@ -185,7 +185,7 @@ extern ibool srv_error_monitor_active;
extern ulong srv_n_spin_wait_rounds; extern ulong srv_n_spin_wait_rounds;
extern ulong srv_n_free_tickets_to_enter; extern ulong srv_n_free_tickets_to_enter;
extern ulong srv_thread_sleep_delay; extern ulong srv_thread_sleep_delay;
extern ulint srv_spin_wait_delay; extern ulong srv_spin_wait_delay;
extern ibool srv_priority_boost; extern ibool srv_priority_boost;
extern ulint srv_mem_pool_size; extern ulint srv_mem_pool_size;
......
...@@ -341,7 +341,7 @@ UNIV_INTERN ulong srv_replication_delay = 0; ...@@ -341,7 +341,7 @@ UNIV_INTERN ulong srv_replication_delay = 0;
UNIV_INTERN ulong srv_n_spin_wait_rounds = 20; UNIV_INTERN ulong srv_n_spin_wait_rounds = 20;
UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500; UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500;
UNIV_INTERN ulong srv_thread_sleep_delay = 10000; UNIV_INTERN ulong srv_thread_sleep_delay = 10000;
UNIV_INTERN ulint srv_spin_wait_delay = 5; UNIV_INTERN ulong srv_spin_wait_delay = 5;
UNIV_INTERN ibool srv_priority_boost = TRUE; UNIV_INTERN ibool srv_priority_boost = TRUE;
#ifdef UNIV_DEBUG #ifdef UNIV_DEBUG
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment