Commit c34ab748 authored by inaam's avatar inaam

branches/zip

Change the read ahead parameter name to innodb_read_ahead_threshold.
Change the meaning of this parameter to signify the number of pages
that must be sequentially accessed for InnoDB to trigger a readahead
request.

Suggested by: Ken
parent 17c8f392
...@@ -485,7 +485,8 @@ buf_read_ahead_linear( ...@@ -485,7 +485,8 @@ buf_read_ahead_linear(
/* How many out of order accessed pages can we ignore /* How many out of order accessed pages can we ignore
when working out the access pattern for linear readahead */ when working out the access pattern for linear readahead */
threshold = ut_min(srv_read_ahead_factor, BUF_READ_AHEAD_AREA); threshold = ut_min((64 - srv_read_ahead_threshold),
BUF_READ_AHEAD_AREA);
fail_count = 0; fail_count = 0;
......
...@@ -9950,13 +9950,11 @@ static MYSQL_SYSVAR_STR(change_buffering, innobase_change_buffering, ...@@ -9950,13 +9950,11 @@ static MYSQL_SYSVAR_STR(change_buffering, innobase_change_buffering,
innodb_change_buffering_validate, innodb_change_buffering_validate,
innodb_change_buffering_update, NULL); innodb_change_buffering_update, NULL);
static MYSQL_SYSVAR_ULONG(read_ahead_factor, srv_read_ahead_factor, static MYSQL_SYSVAR_ULONG(read_ahead_threshold, srv_read_ahead_threshold,
PLUGIN_VAR_RQCMDARG, PLUGIN_VAR_RQCMDARG,
"Number of pages that may be accessed out of order and InnoDB " "Number of pages that must be accessed sequentially for InnoDB to"
"will still issue a readahead." "trigger a readahead.",
"The higher the value the more relaxed the condition for starting " NULL, NULL, 56, 0, 64, 0);
"readahead.",
NULL, NULL, 8, 0, 64, 0);
static struct st_mysql_sys_var* innobase_system_variables[]= { static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(additional_mem_pool_size), MYSQL_SYSVAR(additional_mem_pool_size),
...@@ -10010,7 +10008,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { ...@@ -10010,7 +10008,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR(version), MYSQL_SYSVAR(version),
MYSQL_SYSVAR(use_sys_malloc), MYSQL_SYSVAR(use_sys_malloc),
MYSQL_SYSVAR(change_buffering), MYSQL_SYSVAR(change_buffering),
MYSQL_SYSVAR(read_ahead_factor), MYSQL_SYSVAR(read_ahead_threshold),
MYSQL_SYSVAR(io_capacity), MYSQL_SYSVAR(io_capacity),
NULL NULL
}; };
......
...@@ -161,7 +161,7 @@ extern ulint srv_mem_pool_size; ...@@ -161,7 +161,7 @@ extern ulint srv_mem_pool_size;
extern ulint srv_lock_table_size; extern ulint srv_lock_table_size;
extern ulint srv_n_file_io_threads; extern ulint srv_n_file_io_threads;
extern ulong srv_read_ahead_factor; extern ulong srv_read_ahead_threshold;
extern ulint srv_n_read_io_threads; extern ulint srv_n_read_io_threads;
extern ulint srv_n_write_io_threads; extern ulint srv_n_write_io_threads;
......
...@@ -209,12 +209,10 @@ UNIV_INTERN ulint srv_n_file_io_threads = ULINT_MAX; ...@@ -209,12 +209,10 @@ UNIV_INTERN ulint srv_n_file_io_threads = ULINT_MAX;
UNIV_INTERN ulint srv_n_read_io_threads = ULINT_MAX; UNIV_INTERN ulint srv_n_read_io_threads = ULINT_MAX;
UNIV_INTERN ulint srv_n_write_io_threads = ULINT_MAX; UNIV_INTERN ulint srv_n_write_io_threads = ULINT_MAX;
/* User settable value of the number of pages that InnoDB will tolerate /* User settable value of the number of pages that must be present
within a 64 page extent even if they are accessed out of order or have in the buffer cache and accessed sequentially for InnoDB to trigger a
not been accessed at all. This number (which varies from 0 to 64) is readahead request. */
indicative of the slack that we have when deciding about linear UNIV_INTERN ulong srv_read_ahead_threshold = 56;
readahead. */
UNIV_INTERN ulong srv_read_ahead_factor = 8;
#ifdef UNIV_LOG_ARCHIVE #ifdef UNIV_LOG_ARCHIVE
UNIV_INTERN ibool srv_log_archive_on = FALSE; UNIV_INTERN ibool srv_log_archive_on = FALSE;
......
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