Commit afafe36b authored by peter@mysql.com's avatar peter@mysql.com

Added innodb_max_dirty_pages_pct parameter to limit amount

    of dirty pages in the buffer pool (can be changed online)
parent 33e1b939
...@@ -657,6 +657,7 @@ extern ulong binlog_cache_size, max_binlog_cache_size, open_files_limit; ...@@ -657,6 +657,7 @@ extern ulong binlog_cache_size, max_binlog_cache_size, open_files_limit;
extern ulong max_binlog_size, rpl_recovery_rank, thread_cache_size; extern ulong max_binlog_size, rpl_recovery_rank, thread_cache_size;
extern ulong com_stat[(uint) SQLCOM_END], com_other, back_log; extern ulong com_stat[(uint) SQLCOM_END], com_other, back_log;
extern ulong specialflag, current_pid; extern ulong specialflag, current_pid;
extern ulong srv_max_buf_pool_modified_pct;
extern uint test_flags,select_errors,ha_open_options; extern uint test_flags,select_errors,ha_open_options;
extern uint protocol_version,dropping_tables; extern uint protocol_version,dropping_tables;
......
...@@ -3156,6 +3156,7 @@ enum options { ...@@ -3156,6 +3156,7 @@ enum options {
OPT_INNODB_LOCK_WAIT_TIMEOUT, OPT_INNODB_LOCK_WAIT_TIMEOUT,
OPT_INNODB_THREAD_CONCURRENCY, OPT_INNODB_THREAD_CONCURRENCY,
OPT_INNODB_FORCE_RECOVERY, OPT_INNODB_FORCE_RECOVERY,
OPT_INNODB_MAX_DIRTY_PAGES_PCT,
OPT_BDB_CACHE_SIZE, OPT_BDB_CACHE_SIZE,
OPT_BDB_LOG_BUFFER_SIZE, OPT_BDB_LOG_BUFFER_SIZE,
OPT_BDB_MAX_LOCK, OPT_BDB_MAX_LOCK,
...@@ -3304,6 +3305,10 @@ struct my_option my_long_options[] = ...@@ -3304,6 +3305,10 @@ struct my_option my_long_options[] =
{"innodb_fast_shutdown", OPT_INNODB_FAST_SHUTDOWN, {"innodb_fast_shutdown", OPT_INNODB_FAST_SHUTDOWN,
"Speeds up server shutdown process", (gptr*) &innobase_fast_shutdown, "Speeds up server shutdown process", (gptr*) &innobase_fast_shutdown,
(gptr*) &innobase_fast_shutdown, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, (gptr*) &innobase_fast_shutdown, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
{"innodb_max_dirty_pages_pct", OPT_INNODB_MAX_DIRTY_PAGES_PCT,
"Percentage of dirty pages allowed in bufferpool", (gptr*) &srv_max_buf_pool_modified_pct,
(gptr*) &srv_max_buf_pool_modified_pct, 0, GET_ULONG, REQUIRED_ARG, 90, 0, 100, 0, 0, 0},
#endif /* End HAVE_INNOBASE_DB */ #endif /* End HAVE_INNOBASE_DB */
{"help", '?', "Display this help and exit", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, {"help", '?', "Display this help and exit", 0, 0, 0, GET_NO_ARG, NO_ARG, 0,
0, 0, 0, 0, 0}, 0, 0, 0, 0, 0},
......
...@@ -220,6 +220,11 @@ sys_var_thd_ulong sys_tmp_table_size("tmp_table_size", ...@@ -220,6 +220,11 @@ sys_var_thd_ulong sys_tmp_table_size("tmp_table_size",
sys_var_thd_ulong sys_net_wait_timeout("wait_timeout", sys_var_thd_ulong sys_net_wait_timeout("wait_timeout",
&SV::net_wait_timeout); &SV::net_wait_timeout);
#ifdef HAVE_INNOBASE_DB
sys_var_long_ptr sys_innodb_max_dirty_pages_pct("innodb_max_dirty_pages_pct",
&srv_max_buf_pool_modified_pct);
#endif
/* /*
Variables that are bits in THD Variables that are bits in THD
...@@ -378,6 +383,9 @@ sys_var *sys_variables[]= ...@@ -378,6 +383,9 @@ sys_var *sys_variables[]=
&sys_timestamp, &sys_timestamp,
&sys_tmp_table_size, &sys_tmp_table_size,
&sys_tx_isolation, &sys_tx_isolation,
#ifdef HAVE_INNOBASE_DB
&sys_innodb_max_dirty_pages_pct,
#endif
&sys_unique_checks &sys_unique_checks
}; };
...@@ -446,6 +454,7 @@ struct show_var_st init_vars[]= { ...@@ -446,6 +454,7 @@ struct show_var_st init_vars[]= {
{"innodb_log_files_in_group", (char*) &innobase_log_files_in_group, SHOW_LONG}, {"innodb_log_files_in_group", (char*) &innobase_log_files_in_group, SHOW_LONG},
{"innodb_log_group_home_dir", (char*) &innobase_log_group_home_dir, SHOW_CHAR_PTR}, {"innodb_log_group_home_dir", (char*) &innobase_log_group_home_dir, SHOW_CHAR_PTR},
{"innodb_mirrored_log_groups", (char*) &innobase_mirrored_log_groups, SHOW_LONG}, {"innodb_mirrored_log_groups", (char*) &innobase_mirrored_log_groups, SHOW_LONG},
{sys_innodb_max_dirty_pages_pct.name, (char*) &sys_innodb_max_dirty_pages_pct, SHOW_SYS},
#endif #endif
{sys_interactive_timeout.name,(char*) &sys_interactive_timeout, SHOW_SYS}, {sys_interactive_timeout.name,(char*) &sys_interactive_timeout, SHOW_SYS},
{sys_join_buffer_size.name, (char*) &sys_join_buffer_size, SHOW_SYS}, {sys_join_buffer_size.name, (char*) &sys_join_buffer_size, SHOW_SYS},
......
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