Commit 8dc5c3c4 authored by unknown's avatar unknown

manual.texi:

  Make InnoDB startup option samples easier to understand, do not recommend too big log files


Docs/manual.texi:
  Make InnoDB startup option samples easier to understand, do not recommend too big log files
parent d324d476
Branches unavailable
Tags unavailable
......@@ -36806,44 +36806,39 @@ hard disk. Below is an example of possible configuration parameters in
# You can write your other MySQL server options here
# ...
#
innodb_data_file_path = ibdata1:2000M;ibdata2:2000M
innodb_data_home_dir = c:\ibdata
set-variable = innodb_mirrored_log_groups=1
# Data files must be able to
# hold your data and indexes
innodb_data_file_path = ibdata1:2000M;ibdata2:2000M
# Set buffer pool size to 50 - 80 %
# of your computer's memory
set-variable = innodb_buffer_pool_size=70M
set-variable = innodb_additional_mem_pool_size=10M
innodb_log_group_home_dir = c:\iblogs
# .._log_arch_dir must be the same
# as .._log_group_home_dir
innodb_log_arch_dir = c:\iblogs
innodb_log_archive=0
set-variable = innodb_log_files_in_group=3
set-variable = innodb_log_file_size=30M
# Set the log file size to about
# 15 % of the buffer pool size
set-variable = innodb_log_file_size=10M
set-variable = innodb_log_buffer_size=8M
# Set ..flush_log_at_trx_commit to
# 0 if you can afford losing
# a few last transactions
innodb_flush_log_at_trx_commit=1
#.._arch_dir must be the same as .._log_group_home_dir
innodb_log_arch_dir = c:\iblogs
innodb_log_archive=0
set-variable = innodb_buffer_pool_size=70M
set-variable = innodb_additional_mem_pool_size=10M
set-variable = innodb_file_io_threads=4
set-variable = innodb_lock_wait_timeout=50
@end example
Note that some operating systems
restrict file size to < 2G.
The total size of data files has
Note that data files must be < 4G, and < 2G on
some file systems! The total size of data files has
to be >= 10 MB.
InnoDB does not create directories:
you have to create them yourself.
Check that the MySQL server
has the rights to create files in the directories you specify.
When you the first time create an InnoDB database, it
is best that you start the MySQL server from the command
prompt. Then InnoDB will print the information about the
database creation to the screen, and you see what is
happening. See below in section 3 what the printout
should look like.
For example, in Windows you can start @file{mysqld-max.exe} with:
@example
your-path-to-mysqld>mysqld-max --standalone --console
@end example
Suppose you have a Linux machine with 512 MB RAM and
Suppose you have a Linux computer with 512 MB RAM and
three 20 GB hard disks (at directory paths @file{/},
@file{/dr2} and @file{/dr3}).
Below is an example of possible configuration parameters in @file{my.cnf} for
......@@ -36854,21 +36849,33 @@ InnoDB:
# You can write your other MySQL server options here
# ...
#
innodb_data_file_path = ibdata/ibdata1:2000M;dr2/ibdata/ibdata2:2000M
innodb_data_home_dir = /
set-variable = innodb_mirrored_log_groups=1
innodb_log_group_home_dir = /dr3
# Data files must be able to
# hold your data and indexes
innodb_data_file_path = ibdata/ibdata1:2000M;dr2/ibdata/ibdata2:2000M
# Set buffer pool size to 50 - 80 %
# of your computer's memory
set-variable = innodb_buffer_pool_size=350M
set-variable = innodb_additional_mem_pool_size=20M
innodb_log_group_home_dir = /dr3/iblogs
# .._log_arch_dir must be the same
# as .._log_group_home_dir
innodb_log_arch_dir = /dr3/iblogs
innodb_log_archive=0
set-variable = innodb_log_files_in_group=3
# Set the log file size to about
# 15 % of the buffer pool size
set-variable = innodb_log_file_size=50M
set-variable = innodb_log_buffer_size=8M
# Set ..flush_log_at_trx_commit to
# 0 if you can afford losing
# a few last transactions
innodb_flush_log_at_trx_commit=1
#.._arch_dir must be the same as .._log_group_home_dir
innodb_log_arch_dir = /dr3/iblogs
innodb_log_archive=0
set-variable = innodb_buffer_pool_size=350M
set-variable = innodb_additional_mem_pool_size=20M
set-variable = innodb_file_io_threads=4
set-variable = innodb_lock_wait_timeout=50
#innodb_flush_method=fdatasync
#innodb_fast_shutdown=1
#set-variable = innodb_thread_concurrency=5
@end example
Note that we have placed the two data files on different disks.
......@@ -36882,6 +36889,10 @@ improve the performance of the database if all data is not placed
on the same physical disk. Putting log files on a different disk from
data is very often beneficial for performance.
The combined size of the log files MUST be < 4G in a 32-bit computer,
and to make recovery reasonably fast you should keep the combined size
smaller than the buffer pool size.
The meanings of the configuration parameters are the following:
@multitable @columnfractions .30 .70
......@@ -36909,8 +36920,10 @@ Number of log files in the log group. InnoDB writes to the files in a
circular fashion. Value 3 is recommended here.
@item @code{innodb_log_file_size} @tab
Size of each log file in a log group in megabytes. Sensible values range
from 1M to the size of the buffer pool specified below. The bigger the
value, the less checkpoint flush activity is needed in the buffer pool,
from 1M to 1/nth of the size of the buffer pool specified below,
where n is the number of log files in the group. The
bigger the value,
the less checkpoint flush activity is needed in the buffer pool,
saving disk i/o. But bigger log files also mean that recovery will be
slower in case of a crash. The combined size of log files must
be < 4 GB on 32-bit computers.
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