InnoDB
Configuration
1230
innodb_log_group_home_dir = /dr3/iblogs
#
# Set the log file size to about 25% of the buffer pool size
innodb_log_file_size=250M
innodb_log_buffer_size=8M
#
innodb_flush_log_at_trx_commit=1
innodb_lock_wait_timeout=50
#
# Uncomment the next line if you want to use it
#innodb_thread_concurrency=5
In some cases, database performance improves if the data is not all placed on the same physical disk.
Putting log files on a different disk from data is very often beneficial for performance. The example
illustrates how to do this. It places the two data files on different disks and places the log files on the
third disk.
InnoDB
fills the tablespace beginning with the first data file. You can also use raw disk
partitions (raw devices) as
InnoDB
data files, which may speed up I/O. See
Section 14.2.1.2, “Using
Raw Devices for the Shared Tablespace”
.
Warning
On 32-bit GNU/Linux x86, you must be careful not to set memory usage too
high.
glibc
may permit the process heap to grow over thread stacks, which
crashes your server. It is a risk if the value of the following expression is close to
or exceeds 2GB:
innodb_buffer_pool_size
+ key_buffer_size
+ max_connections*(sort_buffread_buffbinlog_cache_size)
+ max_connections*2MB
Each thread uses a stack (often 2MB, but only 256KB in MySQL binaries
provided by Oracle Corporation.) and in the worst case also uses
sort_buffe read_buffer_size
additional memory.
By compiling MySQL yourself, you can use up to 64GB of
physical memory in 32-bit Windows. See the description for
innodb_buffer_pool_awe_mem_mb
[1238]
in
Section 14.2.2, “
InnoDB
Startup Options and System Variables”
.
Tuning other
mysqld
server parameters. The following values are typical and suit most users:
[mysqld]
skip-external-locking
max_connections=200
read_buffer_size=1M
sort_buffer_size=1M
#
# Set key_buffer to 5 - 50% of your RAM depending on how much
# you use MyISAM tables, but keep key_buffe InnoDB
# buffer pool size < 80% of your RAM
key_buffer_size=
value
On Linux, if the kernel is enabled for large page support,
InnoDB
can use large pages to allocate
memory for its buffer pool and additional memory pool. See
Section 8.9.7, “Enabling Large Page
Support”
.
14.2.1.1. Using Per-Table Tablespaces
You can store each
InnoDB
table and its indexes in its own file. This feature is called “multiple
tablespaces” because in effect each table has its own tablespace.
Using multiple tablespaces can be beneficial to users who want to move specific tables to separate
physical disks or who wish to restore backups of single tables quickly without interrupting the use of
other
InnoDB
tables.
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...