Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
186a5311
Commit
186a5311
authored
Oct 15, 2008
by
Mikael Ronstrom
Browse files
Options
Browse Files
Download
Plain Diff
merged io rate patch from Google
parents
bbf344b6
bab9666d
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
221 additions
and
43 deletions
+221
-43
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+22
-0
storage/innobase/include/log0log.h
storage/innobase/include/log0log.h
+7
-0
storage/innobase/include/srv0srv.h
storage/innobase/include/srv0srv.h
+8
-0
storage/innobase/log/log0log.c
storage/innobase/log/log0log.c
+20
-0
storage/innobase/srv/srv0srv.c
storage/innobase/srv/srv0srv.c
+164
-43
No files found.
storage/innobase/handler/ha_innodb.cc
View file @
186a5311
...
@@ -133,6 +133,13 @@ static my_bool innobase_adaptive_hash_index = TRUE;
...
@@ -133,6 +133,13 @@ static my_bool innobase_adaptive_hash_index = TRUE;
static
char
*
internal_innobase_data_file_path
=
NULL
;
static
char
*
internal_innobase_data_file_path
=
NULL
;
/* Default number of IO per second supported by server. Tunes background
IO rate. */
static
long
innobase_io_capacity
=
100
;
/* Write dirty pages when pct dirty is less than max pct dirty */
static
my_bool
innobase_extra_dirty_writes
=
TRUE
;
/* The following counter is used to convey information to InnoDB
/* The following counter is used to convey information to InnoDB
about server activity: in selects it is not sensible to call
about server activity: in selects it is not sensible to call
srv_active_wake_master_thread after each fetch or search, we only do
srv_active_wake_master_thread after each fetch or search, we only do
...
@@ -1586,6 +1593,9 @@ innobase_init(
...
@@ -1586,6 +1593,9 @@ innobase_init(
#endif
/* UNIV_LOG_ARCHIVE */
#endif
/* UNIV_LOG_ARCHIVE */
srv_log_buffer_size
=
(
ulint
)
innobase_log_buffer_size
;
srv_log_buffer_size
=
(
ulint
)
innobase_log_buffer_size
;
srv_io_capacity
=
(
ulint
)
innobase_io_capacity
;
srv_extra_dirty_writes
=
(
ulint
)
innobase_extra_dirty_writes
;
/* We set srv_pool_size here in units of 1 kB. InnoDB internally
/* We set srv_pool_size here in units of 1 kB. InnoDB internally
changes the value so that it becomes the number of database pages. */
changes the value so that it becomes the number of database pages. */
...
@@ -8010,6 +8020,16 @@ static MYSQL_SYSVAR_BOOL(doublewrite, innobase_use_doublewrite,
...
@@ -8010,6 +8020,16 @@ static MYSQL_SYSVAR_BOOL(doublewrite, innobase_use_doublewrite,
"Disable with --skip-innodb-doublewrite."
,
"Disable with --skip-innodb-doublewrite."
,
NULL
,
NULL
,
TRUE
);
NULL
,
NULL
,
TRUE
);
static
MYSQL_SYSVAR_BOOL
(
extra_dirty_writes
,
innobase_extra_dirty_writes
,
PLUGIN_VAR_NOCMDARG
|
PLUGIN_VAR_READONLY
,
"Flush dirty buffer pages when dirty max pct is not exceeded"
,
NULL
,
NULL
,
TRUE
);
static
MYSQL_SYSVAR_LONG
(
io_capacity
,
innobase_io_capacity
,
PLUGIN_VAR_RQCMDARG
|
PLUGIN_VAR_READONLY
,
"Number of IOPs the server can do. Tunes the background IO rate"
,
NULL
,
NULL
,
100
,
100
,
~
0L
,
0
);
static
MYSQL_SYSVAR_ULONG
(
fast_shutdown
,
innobase_fast_shutdown
,
static
MYSQL_SYSVAR_ULONG
(
fast_shutdown
,
innobase_fast_shutdown
,
PLUGIN_VAR_OPCMDARG
,
PLUGIN_VAR_OPCMDARG
,
"Speeds up the shutdown process of the InnoDB storage engine. Possible "
"Speeds up the shutdown process of the InnoDB storage engine. Possible "
...
@@ -8225,6 +8245,8 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
...
@@ -8225,6 +8245,8 @@ static struct st_mysql_sys_var* innobase_system_variables[]= {
MYSQL_SYSVAR
(
thread_concurrency
),
MYSQL_SYSVAR
(
thread_concurrency
),
MYSQL_SYSVAR
(
thread_sleep_delay
),
MYSQL_SYSVAR
(
thread_sleep_delay
),
MYSQL_SYSVAR
(
autoinc_lock_mode
),
MYSQL_SYSVAR
(
autoinc_lock_mode
),
MYSQL_SYSVAR
(
extra_dirty_writes
),
MYSQL_SYSVAR
(
io_capacity
),
NULL
NULL
};
};
...
...
storage/innobase/include/log0log.h
View file @
186a5311
...
@@ -169,6 +169,13 @@ void
...
@@ -169,6 +169,13 @@ void
log_buffer_flush_to_disk
(
void
);
log_buffer_flush_to_disk
(
void
);
/*==========================*/
/*==========================*/
/********************************************************************
/********************************************************************
Flushes the log buffer. Forces it to disk depending on the value of
the configuration parameter innodb_flush_log_at_trx_commit. */
void
log_buffer_flush_maybe_sync
(
void
);
/*==========================*/
/********************************************************************
Advances the smallest lsn for which there are unflushed dirty blocks in the
Advances the smallest lsn for which there are unflushed dirty blocks in the
buffer pool and also may make a new checkpoint. NOTE: this function may only
buffer pool and also may make a new checkpoint. NOTE: this function may only
be called if the calling thread owns no synchronization objects! */
be called if the calling thread owns no synchronization objects! */
...
...
storage/innobase/include/srv0srv.h
View file @
186a5311
...
@@ -91,6 +91,14 @@ extern ulint srv_lock_table_size;
...
@@ -91,6 +91,14 @@ extern ulint srv_lock_table_size;
extern
ulint
srv_n_file_io_threads
;
extern
ulint
srv_n_file_io_threads
;
/* Number of IO operations per second the server can do */
extern
ulint
srv_io_capacity
;
/* Flush dirty pages when below max dirty percent */
extern
ibool
srv_extra_dirty_writes
;
#ifdef UNIV_LOG_ARCHIVE
#ifdef UNIV_LOG_ARCHIVE
extern
ibool
srv_log_archive_on
;
extern
ibool
srv_log_archive_on
;
extern
ibool
srv_archive_recovery
;
extern
ibool
srv_archive_recovery
;
...
...
storage/innobase/log/log0log.c
View file @
186a5311
...
@@ -1516,6 +1516,26 @@ log_buffer_flush_to_disk(void)
...
@@ -1516,6 +1516,26 @@ log_buffer_flush_to_disk(void)
log_write_up_to
(
lsn
,
LOG_WAIT_ALL_GROUPS
,
TRUE
);
log_write_up_to
(
lsn
,
LOG_WAIT_ALL_GROUPS
,
TRUE
);
}
}
/********************************************************************
Flush the log buffer. Force it to disk depending on the value of
innodb_flush_log_at_trx_commit. */
void
log_buffer_flush_maybe_sync
(
void
)
/*==========================*/
{
dulint
lsn
;
mutex_enter
(
&
(
log_sys
->
mutex
));
lsn
=
log_sys
->
lsn
;
mutex_exit
(
&
(
log_sys
->
mutex
));
/* Force log buffer to disk when innodb_flush_log_at_trx_commit = 1. */
log_write_up_to
(
lsn
,
LOG_WAIT_ALL_GROUPS
,
srv_flush_log_at_trx_commit
==
1
?
TRUE
:
FALSE
);
}
/********************************************************************
/********************************************************************
Tries to establish a big enough margin of free space in the log buffer, such
Tries to establish a big enough margin of free space in the log buffer, such
that a new log entry can be catenated without an immediate need for a flush. */
that a new log entry can be catenated without an immediate need for a flush. */
...
...
storage/innobase/srv/srv0srv.c
View file @
186a5311
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment