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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
8b39795b
Commit
8b39795b
authored
Jul 16, 2003
by
lenz@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- heavily reworked the comments and layout of the new sample my.cnf file
as requested by PeterZ
parent
42d6dea6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
305 additions
and
265 deletions
+305
-265
support-files/my-innodb-heavy-4G.cnf.sh
support-files/my-innodb-heavy-4G.cnf.sh
+305
-265
No files found.
support-files/my-innodb-heavy-4G.cnf.sh
View file @
8b39795b
#BEGIN CONFIG INFO
#BEGIN CONFIG INFO
#DESCR:
4G,Innodb only,ACID, Few Connections
heavy queries
#DESCR:
4GB RAM, InnoDB only, ACID, few connections,
heavy queries
#TYPE: SYSTEM
#TYPE: SYSTEM
#END CONFIG INFO
#END CONFIG INFO
# This is example config file for systems with 4G of memory running mostly MySQL
# using MyISAM only tables and running complex queries with few connections
#
#
# This is a MySQL example config file for systems with 4GB of memory
# running mostly MySQL using InnoDB only tables and performing complex
# queries with few connections.
#
#
# You can copy this file to
# You can copy this file to /etc/my.cnf to set global options,
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options
# mysql-data-dir/my.cnf to set server-specific options (in this
# (@localstatedir@ for this installation) or to
# installation this directory is @localstatedir@) or
# ~/.my.cnf to set user-specific options.
# ~/.my.cnf to set user-specific options.
#
#
# One can in this file use all long options that the program supports.
# In this file, you can use all long options that the program supports.
# If you want to know which options a program support, run the program
# If you want to know the options a program supports, run the program
# with --help option.
# with the "--help" option.
#
# More detailed information about the individual options can also be
# found in the manual.
#
# The following options will be passed to all MySQL clients
#
# But note, only client programs shipped by MySQL are guarantied to read it
# The following options will be read by MySQL client applications.
# If you wish your software to read this section you would need to specify
# Note that only client applications shipped by MySQL are guaranteed
# it as an option during MySQL client library initialization
# to read this section. If you want your own MySQL client program to
# honor these values, you need to specify it as an option during the
# MySQL client library initialization.
#
[
client]
[
client]
#password =
your_password
#password =
[your_password]
port
=
@MYSQL_TCP_PORT@
port
=
@MYSQL_TCP_PORT@
socket
=
@MYSQL_UNIX_ADDR@
socket
=
@MYSQL_UNIX_ADDR@
# ***
******* Here follows entries for some specific programs
# ***
Application-specific options follow here ***
#
# The MySQL server
# The MySQL server
#
[
mysqld]
[
mysqld]
# generic configuration options
# generic configuration options
port
=
@MYSQL_TCP_PORT@
port
=
@MYSQL_TCP_PORT@
socket
=
@MYSQL_UNIX_ADDR@
socket
=
@MYSQL_UNIX_ADDR@
# back_log is the number of connections the operating system can keep in
# Back Log is a number of connection OS can keep in queue, before MySQL
# the listen queue, before the MySQL connection manager thread has
# connection manager thread has processed them. If you have very intensive
# processed them. If you have a very high connection rate and experience
# connection rate and experience "connection refused" errors you might need
# "connection refused" errors, you might need to increase this value.
# to increase this value
# Check your OS documentation for the maximum value of this parameter.
# Attempting to set back_log higher than your operating system limit
# will have no effect.
back_log
=
50
back_log
=
50
# Don't listen on a TCP/IP port at all. This can be a security
#
Don't listen on a TCP/IP port at all. This can be a security enhancement,
#
enhancement, if all processes that need to connect to mysqld run
#
if all processes that need to connect to mysqld run on the same host.
#
on the same host. All interaction with mysqld must be made via Unix
#
All interaction with mysqld must be made via Unix
sockets or named pipes.
# sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
# (via the "enable-named-pipe" option) will render mysqld useless!
#skip-networking
#skip-networking
# Maximum amount of concurrent sessions MySQL server will allow
# The maximum amount of concurrent sessions the MySQL server will
# One of these connections will be reserved for user with SUPER privelege
# allow. One of these connections will be reserved for a user with
# to allow administrator to login even if server is overloaded.
# SUPER privileges to allow the administrator to login even if the
# connection limit has been reached.
max_connections
=
100
max_connections
=
100
# Maximum amount of errors allowed per host. If this limit is reached,
#
Maximum amount of errors allowed per host. If this limit is reached
#
the host will be blocked from connecting to the MySQL server until
#
host will be blocked from connection MySQL server until "flush hosts"
#
"FLUSH HOSTS" has been run or the server was restarted. Invalid
#
is run or server restart. Invalid passwords as any other errors at
#
passwords and other errors during the connect phase result in
#
connect phase results in increasing this value. See
#
increasing this value. See the "Aborted_Connects" status variable for
#
Aborted_Connects status variable for
global counter.
# global counter.
max_connect_errors
=
10
max_connect_errors
=
10
# The number of open tables for all threads. Increasing this value
#
Amount of tables server can keep open at the time. Each table
#
increases the number of file descriptors that mysqld requires.
#
may require up to 2 file handlers (for MERGE tables even more)
#
Therefore you have to make sure to set the amount of open files
#
so make sure to have amount of open files allowed at least 4096
#
allowed to at least 4096 in the variable "open-files-limit" in
# se
e open-files-limit i
n [mysqld_safe]
# se
ctio
n [mysqld_safe]
table_cache
=
2048
table_cache
=
2048
#
Do not use file level locking. Enabled file locking give performance
#
Enable external file level locking. Enabled file locking will have a
#
hit, so use it only in case you have serveral database instances
#
negative impact on performance, so only use it in case you have
#
running on the same files (note some restrictions still apply!)
#
multiple database instances running on the same files (note some
#
or if you use other software relaying on locking MyISAM tables
#
restrictions still apply!) or if you use other software relying on
#
on file level
#
locking MyISAM tables on file level.
#e
nable
-locking
#e
xternal
-locking
# Th
is packets limits maximum size of BLOB server can handle
# Th
e maximum size of a query packet the server can handle as well as
#
as well as maximum query size server can process
#
maximum query size server can process (Important when working with
#
enlarged dynamically, for each connection
#
large BLOBs). enlarged dynamically, for each connection.
max_allowed_packet
=
16M
max_allowed_packet
=
16M
# Binary log cache is used for logging transactions to binary log
# The size of the cache to hold the SQL statements for the binary log
# all statements from transactions are buffered in binary log cache
# during a transaction. If you often use big, multi-statement
# and wrote to the binary log at once on commit
# transactions you can increase this value to get more performance. All
# if transaction is large than this value disk temporary file is used.
# statements from transactions are buffered in the binary log cache and
# This buffer is allocated per connection on first update statement
# are being written to the binary log at once after the COMMIT. If the
# in transaction
# transaction is larger than this value, temporary file on disk is used
# instead. This buffer is allocated per connection on first update
# statement in transaction
binlog_cache_size
=
1M
binlog_cache_size
=
1M
# Maximum allowed size for a single HEAP (in memory) table. This option
# is a protection against the accidential creation of a very large HEAP
# table which could otherwise use up all memory resources.
max_heap_table_size
=
64M
# Maximum allowed size for single HEAP (in memory) table
# Sort buffer is used to perform sorts for some ORDER BY and GROUP BY
# This option is protection from accidential creation of the HEAP
# queries. If sorted data does not fit into the sort buffer, a disk
# table which would take all the memory resources
# based merge sort is used instead - See "sort_merge_passes". Allocated
max_heap_table_size
=
64M
# per thread if sort is needed.
# Sort buffer used to perform sorts for some of ORDER BY and
# GROUP BY queries. If sorted data does not fit into sort buffer
# Disk based merge sort is used - See sort_merge_passes.
# Allocated per thread if sort is needed
sort_buffer_size
=
8M
sort_buffer_size
=
8M
# This buffer is used for optimization of full joins (joins without indexes)
# This buffer is used for the optimization of full JOINs (JOINs without
# Such joins are very bad for performance in most cases anyway, but having
# indexes). Such JOINs are very bad for performance in most cases
# this variable large reduces performance impact.
# anyway, but setting this variable to a large value reduces the
# see select_full_join status variable for full joins count
# performance impact. See the "select_full_join" status variable for a
# Allocated per thread if full join is found
# count of full JOINs. Allocated per thread if full join is found
join_buffer_size
=
8M
join_buffer_size
=
8M
# How many threads we should keep in a cache for reuse. When a client
# Cache threads on disconnect instead of destroying them
# disconnects, the client's threads are put in the cache if there aren't
# thread cache allows to greatly reduce amount of thread
# more than thread_cache_size threads from before. This greatly reduces
# creations needed if you have a lot of connections
# the amount of thread creations needed if you have a lot of new
# connections. (Normally this doesn't give a notable performance
# improvement if you have a good thread implementation.)
thread_cache
=
8
thread_cache
=
8
# This permits the application to give the threads system a hint for the
# Try number of CPU's*(2..4) for thread_concurrency
# desired number of threads that should be run at the same time. This
# This value makes sense only on few systems (as Solaris)
# value only makes sense on systems that support the thread_concurrency()
# which support thread_concurrency() setting
# function call (Sun Solaris, for example).
# You should try [number of CPUs]*(2..4) for thread_concurrency
thread_concurrency
=
8
thread_concurrency
=
8
# Query cache is used to cache SELECT results and later return them
# Query cache is used to cache SELECT results and later return
# without actual executing the same query once again. Having the query
# them without actual query execution for exactly the same query
# cache enabled may result in significant speed improvements, if your
# Having query cache enabled may give great benefit if your have
# have a lot of identical queries and rarely changing tables. See the
# typical queries and rarely changed tabled
# "Qcache_lowmem_prunes" status variable to check if the current value
# see Qcache_lowmem_prunes status variable to check if current
# is high enough for your load.
# value is enough for your load
# Note: In case your tables change very often or if your queries are
# Note: In case your table change all the time or you never have
# textually different every time, the query cache may result in a
# textually same queries query cache maay bring slowdown
# slowdown instead of a performance improvement.
# instead of performance improvement
query_cache_size
=
64M
query_cache_size
=
64M
#
Cache only result sets which are smaller than this limit
#
Only cache result sets that are smaller than this limit. This is to
#
This setting is protection of very large result set overwriting
#
protect the query cache of a very large result set overwriting all
#
all queries in query cache
#
other query results.
query_cache_limit
=
2M
query_cache_limit
=
2M
# Minimum word length to be indexed by full text search index
# Minimum word length to be indexed by the full text search index.
# you might wish to decrease it if you need to search on shorter words
# You might wish to decrease it if you need to search for shorter words.
# Note that you need to rebuild your FULLTEXT index, after you have
# modified this value.
ft_min_word_len
=
4
ft_min_word_len
=
4
# If your system supports memlock() function you might use this option
# If your system supports the memlock() function call, you might want to
# while running MySQL to keep it locking in memory, avoid potential
# enable this option while running MySQL to keep it locked in memory and
# swapping out in case of high memory pressure. Good for performance.
# to avoid potential swapping out in case of high memory pressure. Good
# for performance.
#memlock
#memlock
# Table type which is used by default
, if not specified by CREATE TABLE
# Table type which is used by default
when creating new tables, if not
#
it affects only tables explicitly created by user
.
#
specified differently during the CREATE TABLE statement
.
default_table_type
=
MYISAM
default_table_type
=
MYISAM
# Thread stack size to use. This amount of memory is always reserved at
# Thread stack size to use. This amount of memory is always reserved at
# connection time. MySQL itself usually needs no more than 64K of memory,
# connection time. MySQL itself usually needs no more than 64K of
# while if you use your own stack hungry UDF functions or OS requires more
# memory, while if you use your own stack hungry UDF functions or your
# stack for some operations, you might need to set it higher
# OS requires more stack for some operations, you might need to set this
# to a higher value.
thread_stack
=
192K
thread_stack
=
192K
# Set default transaction isolation level. Levels available are:
# Set
the
default transaction isolation level. Levels available are:
# READ-UNCOMMITED, READ-COMMITED, REPEATABLE-READ, SERIALIZABLE
# READ-UNCOMMITED, READ-COMMITED, REPEATABLE-READ, SERIALIZABLE
transaction_isolation
=
REPEATABLE-READ
transaction_isolation
=
REPEATABLE-READ
# Maximum size for internal in memory temporary table. If table
# Maximum size for internal (in-memory) temporary tables. If a table
# grows larger it is automatically converted to disk based table
# grows larger than this value, it is automatically converted to disk
# This limitaion is for single table. There can be many of them.
# based table This limitation is for a single table. There can be many
# of them.
tmp_table_size
=
64M
tmp_table_size
=
64M
#
binary logging is required for acting MASTER in replication
#
Enable binary logging. This is required for acting as a MASTER in a
#
You also need binary log if you need ability to do point
#
replication configuration. You also need the binary log if you need
#
in time recovery from your latest backup
#
the ability to do point in time recovery from your latest backup.
log_bin
log_bin
# If you're using
chaining replication A->B->C you might wish
to
# If you're using
replication with chained slaves (A->B->C), you need
to
#
turn on this option on server B. It makes
updates done by
#
enable this option on server B. It enables logging of
updates done by
#
slave thread also logged in binary log. Normally they are not
#
the slave thread into the slave's binary log.
#log_slave_updates
#log_slave_updates
# Enable the full query log. Every query (even ones with incorrect
#
Full query log. Every query (even with incorrect syntax) server gets goes here.
#
syntax) that the server receives will be logged. This is useful for
#
Useful for debugging. Normally is disabled in production
#
debugging, it is usually disabled in production use.
#log
#log
# If you have any problems with MySQL server you might enable Warnings logging and
# Print warnings to the error log file. If you have any problem with
# examine error log for possible explanations.
# MySQL you should enable logging of warnings and examine the error log
# for possible explanations.
#log_warnings
#log_warnings
# Log slow queries. Slow queries are queries which take more than defined amount of time
# Log slow queries. Slow queries are queries which take more than the
# or which do not use indexes well, if log_long_format is enabled
# amount of time defined in "long_query_time" or which do not use
# It is notmally good idea to have this on if you frequently add new queries to the system
# indexes well, if log_long_format is enabled. It is normally good idea
# to have this turned on if you frequently add new queries to the
# system.
log_slow_queries
log_slow_queries
# All queries taking more than this amount of time (in seconds) will be
#
All queries taking more than this amount of time will be trated as slow. Do not use value 1
#
trated as slow. Do not use "1" as a value here, as this will result in
#
here as this will result even in very fast queries logged sometimes, as MySQL measures time with
#
even very fast queries being logged from time to time (as MySQL
#
second accuracy only
.
#
currently measures time with second accuracy only)
.
long_query_time
=
2
long_query_time
=
2
# Log more information in slow query log. Normally it is good to have this on.
# Log more information in the slow query log. Normally it is good to
# It results in logging of queries not using indexes additionally to long running queries.
# have this turned on. This will enable logging of queries that are not
# using indexes in addition to long running queries.
log_long_format
log_long_format
# The directory used by MySQL for storing temporary files. For example,
# it is used to perform disk based large sorts, as well as for internal
# Temporary directory is used by MySQL for storing temporary files, for example
# and explicit temporary tables. It might be good to put it on a
# used to do disk based large sorts, as well as for internal and explicit
# swapfs/tmpfs filesystem, if you do not create very large temporary
# temporary tables.
# files. Alternatively you can put it on dedicated disk. You can
# It might be good to set it to swapfs/tmpfs filesystem if you do not have very
# specify multiple paths here by separating them by ";" - they will then
# large temporary files created or set it to dedicated disk
# be used in a round-robin fashion.
# You can specify several paths here spliting them by ";" they will be used in
# round-robin fashion
#tmpdir = /tmp
#tmpdir = /tmp
#*** Replication related settings
#
*** Replication related settings
# This value is required both for master ans slave
# Unique server identification number between 1 and 2^32-1. This value
# If you have single master it is typical to use value 1 for it
# is required for both master and slave hosts. It defaults to 1 if
# required unique id between 1 and 2^32 - 1
# "master-host" is not set, but will MySQL will not function as a master
# defaults to 1 if master-host is not set
# if it is omitted.
# but will not function as a master if omitted
server-id
=
1
server-id
=
1
# Replication Slave (comment out master section to use this)
# To configure this server as Replication Slave you will need
# to set its server_id to some unique value, different from Master
# and all slaves in the group.
# You also can disable log-bin as logs are not required (while recomended)
# for slaves
#
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
#
# The recomended way to set MASTER settings for the slave are:
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
# Use the CHANGE MASTER TO command (fully described in our manual) -
# the syntax is:
# the syntax is:
#
#
# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
...
@@ -252,19 +262,23 @@ server-id = 1
...
@@ -252,19 +262,23 @@ server-id = 1
# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
# MASTER_USER='joe', MASTER_PASSWORD='secret';
# MASTER_USER='joe', MASTER_PASSWORD='secret';
#
#
# However if you need to replicate slave configuration over several boxes
# OR
# you can use old approach:
#
#
#
Set the variables below. However, in case you choose this method, then
#
2)
Set the variables below. However, in case you choose this method, then
# start replication for the first time (even unsuccessfully, for example
# start replication for the first time (even unsuccessfully, for example
# if you mistyped the password in master-password and the slave fails to
# if you mistyped the password in master-password and the slave fails to
# connect), the slave will create a master.info file, and any later
# connect), the slave will create a master.info file, and any later
# change
in this file to the variables'
values below will be ignored and
# change
s in this file to the variable
values below will be ignored and
# overridden by the content of the master.info file, unless you shutdown
# overridden by the content of the master.info file, unless you shutdown
# the slave server, delete master.info and restart the slaver server.
# the slave server, delete master.info and restart the slaver server.
# For that reason, you may want to leave the lines below untouched
# For that reason, you may want to leave the lines below untouched
# (commented) and instead use CHANGE MASTER TO (see above)
# (commented) and instead use CHANGE MASTER TO (see above)
#
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id = 2
#
#
# The replication master for this slave - required
# The replication master for this slave - required
#master-host = <hostname>
#master-host = <hostname>
...
@@ -281,162 +295,188 @@ server-id = 1
...
@@ -281,162 +295,188 @@ server-id = 1
# optional - defaults to 3306
# optional - defaults to 3306
#master-port = <port>
#master-port = <port>
# Make Slave ReadOnly. Only user with SUPER privelege and slave
# Make the slave read-only. Only users with the SUPER privilege and the
# thread will be able to modify it. You might use it to ensure
# replication slave thread will be able to modify data on it. You can
# no applications will accidently modify slave instead of master
# use this to ensure that no applications will accidently modify data on
# the slave instead of the master
#read_only
#read_only
#*** MyISAM Specific options
#*** MyISAM Specific options
# Size of
Key Buffer, used to cache index blocks for MyISAM tables
# Size of
the Key Buffer, used to cache index blocks for MyISAM tables.
# Do not set it larger than 30% of available memory, as some memory
# Do not set it larger than 30% of
your
available memory, as some memory
# is
required by OS to cache rows.
# is
also required by the OS to cache rows. Even if you're not using
#
Even if you're not using MyISAM tables still set it to 8-64M
#
MyISAM tables, you should still set it to 8-64M as it will also be
#
as it will be
used for internal temporary disk tables.
# used for internal temporary disk tables.
key_buffer_size
=
32M
key_buffer_size
=
32M
# Size of
buffer used for doing full table scans for MyISAM tables
# Size of
the buffer used for doing full table scans of MyISAM tables.
#
allocated per thread, as full scan is needed
#
Allocated per thread, if a full scan is needed.
read_buffer_size
=
2M
read_buffer_size
=
2M
# Buffer is used for caching the rows while doing Sorts
# When reading rows in sorted order after a sort, the rows are read
# Allocated per thread, then needed
# through this buffer to avoid a disk seeks. You can improve ORDER BY
# performance a lot, if set this to a high value.
# Allocated per thread, when needed.
read_rnd_buffer_size
=
16M
read_rnd_buffer_size
=
16M
# The bulk insert tree is used for optimization of index modification
# MyISAM uses special tree-like cache to make bulk inserts (that is,
# for bulk inserts (hundreds+ values) and LOAD DATA INFILE
# INSERT ... SELECT, INSERT ... VALUES (...), (...), ..., and LOAD DATA
# Do not set larger than key_buffer_size for optimal performance
# INFILE) faster. This variable limits the size of the cache tree in
# This buffer is allocated than bulk insert is detected
# bytes per thread. Setting it to 0 will disable this optimisation. Do
# not set it larger than "key_buffer_size" for optimal performance.
# This buffer is allocated when a bulk insert is detected.
bulk_insert_buffer_size
=
64M
bulk_insert_buffer_size
=
64M
# This buffer is allocated when MySQL needs to rebuild the index in
# This buffer is allocated than MySQL needs to rebuild the Index,
# REPAIR, OPTIMZE, ALTER table statements as well as in LOAD DATA INFILE
# in REPAIR, OPTIMZE, ALTER table statements as well as in
# into an empty table. It is allocated per thread so be careful with
# LOAD DATA INFILE to empty table
# large settings.
# it is allocated per thread so be careful with large settings.
myisam_sort_buffer_size
=
128M
myisam_sort_buffer_size
=
128M
# Maximum size of temporary (sort) file index rebuild can use.
# The maximum size of the temporary file MySQL is allowed to use while
# If sort is estimated to take larger amount of space, mush slower
# recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE.
# (keycache) index rebuild method will be used
# If the file-size would be bigger than this, the index will be created
# through the key cache (which is slower).
myisam_max_sort_file_size
=
10G
myisam_max_sort_file_size
=
10G
# Use sort method in case the difference between sort file and
# If the temporary file used for fast index creation would be bigger
# Table index file is estimated to be less than this value
# than using the key cache by the amount specified here, then prefer the
# key cache method. This is mainly used to force long character keys in
# large tables to use the slower key cache method to create the index.
myisam_max_extra_sort_file_size
=
10G
myisam_max_extra_sort_file_size
=
10G
# If
table has more than one index MyISAM can use more than one thread
# If
a table has more than one index, MyISAM can use more than one
# t
o repair them in parallel. It makes sense if you have multiple of
# t
hread to repair them by sorting in parallel. This makes sense if you
#
CPUs and pla
nty of memory.
#
have multiple CPUs and ple
nty of memory.
myisam_repair_threads
=
1
myisam_repair_threads
=
1
# Automatically check and repair not properly closed MyISAM tables
# Automatically check and repair not properly closed MyISAM tables
.
myisam_recover
myisam_recover
# *** BDB Specific options ***
#
*** BDB Specific options
#
Use this option if you run a MySQL server with BDB support enabled but
# you do not plan to use it. This will save memory and may speed up some
#
Use this option if you have BDB tables enabled but you do not plan to use them
#
things.
skip-bdb
skip-bdb
#
*** INNODB Specific options
#
*** INNODB Specific options ***
# Use this option if you have INNODB tables enabled but you do not plan to use them
# Use this option if you have a MySQL server with InnoDB support enabled
# but you do not plan to use it. This will save memory and disk space
# and speed up some things.
#skip-innodb
#skip-innodb
# Additional memory pool is used by Innodb to store metadata information.
# Additional memory pool that is used by InnoDB to store metadata
# If Innodb needs more memory for this purpose to allocate it from OS
# information. If InnoDB requires more memory for this purpose it will
# As it is fast enough on most recent OS you normally do not need to set it higher
# start to allocate it from the OS. As this is fast enough on most
# SHOW INNODB STATUS will show current amount of it in use
# recent operating systems, you normally do not need to change this
# value. SHOW INNODB STATUS will display the current amount used.
innodb_additional_mem_pool_size
=
16M
innodb_additional_mem_pool_size
=
16M
# Innodb, unlike MyISAM uses bufferpool to cache both indexes and row data
# InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and
# so you would normally wish to have it large up to 50-70% of your memory size
# row data. The bigger you set this the less disk I/O is needed to
# Note on 32bit systems you might be limited to 2-3.5G of user level memory
# access data in tables. On a dedicated database server you may set this
# per process so do not set it too high.
# parameter up to 80% of the machine physical memory size. Do not set it
# too large, though, because competition of the physical memory may
# cause paging in the operating system. Note that on 32bit systems you
# might be limited to 2-3.5G of user level memory per process, so do not
# set it too high.
innodb_buffer_pool_size
=
2G
innodb_buffer_pool_size
=
2G
# Innodb stores data in one or several files forming tablespace. If you have
# InnoDB stores data in one or more data files forming the tablespace.
# single logical drive for your data, single autoextending file would be good enough
# If you have a single logical drive for your data, a single
# In other case single file per device is often good choice.
# autoextending file would be good enough. In other cases, a single file
# You may setup Innodb to use Raw disk partitions as well. Refer to the manual.
# per device is often a good choice. You can configure InnoDB to use raw
# disk partitions as well - please refer to the manual for more info
# about this.
innodb_data_file_path
=
ibdata1:10M:autoextend
innodb_data_file_path
=
ibdata1:10M:autoextend
# Set this option if you would like the InnoDB tablespace files to be
# stored in another location. By default this is the MySQL datadir.
#innodb_data_home_dir = <directory>
# Set this option if you would like Innodb tablespace files to be stored in other
# Number of IO threads to use for async IO operations. This value is
# location. Default is MySQL datadir.
# hardcoded to 4 on Unix, but on Windows disk I/O may benefit from a
#innodb_data_home_dir
# larger number.
# Number of IO threads to use for async IO operations. This value is hardcoded to
# 4 on Unix
innodb_file_io_threads
=
4
innodb_file_io_threads
=
4
# If you run into InnoDB tablespace corruption, setting this to a nonzero
# If you run into Innodb tablespace corruption, setting this to nonzero value will
# value will likely help you to dump your tables. Start from value 1 and
# likely help you to dump your tables. Start from value 1 and increase it until
# increase it until you're able to dump the table successfully.
# you're able to dump the table successfully.
#innodb_force_recovery=1
#innodb_force_recovery=1
# Number of threads allowed inside
of Innodb kernel. Best setting highly depends
# Number of threads allowed inside
the InnoDB kernel. The optimal value
#
on the application, hardware as well as OS scheduler properties
#
depends highly on the application, hardware as well as the OS
#
Too high value may lead to thread thrashing
#
scheduler properties. A too high value may lead to thread thrashing.
innodb_thread_concurrency
=
16
innodb_thread_concurrency
=
16
# If set to 1, InnoDB will flush (fsync) the transaction logs to the
# If set to 1 Innodb will flush(fsync) logs to the disk at each transaction commit
# disk at each commit, which offers full ACID behavior. If you are
# which offers full ACID behavior, however if you can afford few last commited transaction
# willing to compromise this safety, and you are running small
# lost you can set this value to 2 or 0. Innodb will anyway flush the log file once
# transactions, you may set this to 0 or 2 to reduce disk I/O to the
# per second. 0 - do not flush file at all. 2 - flush it to OS buffers but not to the disk.
# logs. Value 0 means that the log is only written to the log file and
# the log file flushed to disk approximately once per second. Value 2
# means the log is written to the log file at each commit, but the log
# file is only flushed to disk approximately once per second.
innodb_flush_log_at_trx_commit
=
1
innodb_flush_log_at_trx_commit
=
1
# Speed up InnoDB shutdown. This will disable InnoDB to do a full purge
# Innodb uses fast shutdown by default. However you can disable it to make Innodb to do
# and insert buffer merge on shutdown. It may increase shutdown time a
# purge and Insert buffer merge on shutdown. It may increase shutdown time a lot but
# lot, but InnoDB will have to do it on the next startup instead.
# Innodb will have not need to do it after next startup
#innodb_fast_shutdown
#innodb_fast_shutdown
# Buffer Innodb shall use for buffering log data. As soon as it is full Innodb
# The size of the buffer InnoDB uses for buffering log data. As soon as
# will have to flush it. As it is flushed once per second anyway even with
# it is full, InnoDB will have to flush it to disk. As it is flushed
# long transactions it does not make sense to have it very large.
# once per second anyway, it does not make sense to have it very large
# (even with long transactions).
innodb_log_buffer_size
=
8M
innodb_log_buffer_size
=
8M
# Size of log file in group. You shall set combined size of log files large 25%-100% of
# Size of each log file in a log group. You should set the combined size
# your buffer pool size to avoid not needed buffer pool flush activity on log file
# of log files to about 25%-100% of your buffer pool size to avoid
# overwrite. Note however larger logfile size will increase time needed for recovery
# unneeded buffer pool flush activity on log file overwrite. However,
# process.
# note that a larger logfile size will increase the time needed for the
# recovery process.
innodb_log_file_size
=
256M
innodb_log_file_size
=
256M
# Total number of files in the log group. Value 2-3 is usually good enough.
# Total number of files in the log group. A value of 2-3 is usually good
# enough.
innodb_log_files_in_group
=
3
innodb_log_files_in_group
=
3
# Location for Innodb log files. Default is MySQL datadir. You may wish to
# Location of the InnoDB log files. Default is the MySQL datadir. You
# point it to dedicated hard drive or RAID1 volume for improved performance
# may wish to point it to a dedicated hard drive or a RAID1 volume for
# improved performance
#innodb_log_group_home_dir
#innodb_log_group_home_dir
# Maximum allowed Percentage of dirty pages in Innodb buffer pool.
# Maximum allowed percentage of dirty pages in the InnoDB buffer pool.
# If it is reached Innodb will start flushing them agressively not to run
# If it is reached, InnoDB will start flushing them out agressively to
# out of clean pages at all. This is a soft limit, not guarantied to be held.
# not run out of clean pages at all. This is a soft limit, not
# guaranteed to be held.
innodb_max_dirty_pages_pct
=
90
innodb_max_dirty_pages_pct
=
90
# The flush method InnoDB will use for Log. The tablespace always uses
# Set flush method Innodb will use for Log. Tablespace always uses doublewrite flush logic.
# doublewrite flush logic. The default value is "fdatasync", another
#innodb_flush_method
# option is "O_DSYNC".
#innodb_flush_method=O_DSYNC
# How long Innodb transaction shall wait for lock to be granted before giving up.
# This value does not correspond to deadlock resolution. Innodb will detect Deadlock
# How long an InnoDB transaction should wait for a lock to be granted
# as soon as it is formed.
# before being rolled back. InnoDB automatically detects transaction
# deadlocks in its own lock table and rolls back the transaction. If you
# use the LOCK TABLES command, or other transaction-safe storage engines
# than InnoDB in the same transaction, then a deadlock may arise which
# InnoDB cannot notice. In cases like this the timeout is useful to
# resolve the situation.
innodb_lock_wait_timeout
=
120
innodb_lock_wait_timeout
=
120
[
mysqldump]
[
mysqldump]
# Do not buffer
whole result set in memory before writing it to file
# Do not buffer
the whole result set in memory before writing it to
#
r
equired for dumping very large tables
#
file. R
equired for dumping very large tables
quick
quick
max_allowed_packet
=
16M
max_allowed_packet
=
16M
...
@@ -444,7 +484,7 @@ max_allowed_packet = 16M
...
@@ -444,7 +484,7 @@ max_allowed_packet = 16M
[
mysql]
[
mysql]
no-auto-rehash
no-auto-rehash
#
Remove the next comment character if you are not familiar with SQL
#
Only allow UPDATEs and DELETEs that use keys.
#safe-updates
#safe-updates
[
isamchk]
[
isamchk]
...
@@ -463,7 +503,7 @@ write_buffer = 8M
...
@@ -463,7 +503,7 @@ write_buffer = 8M
interactive-timeout
interactive-timeout
[
mysqld_safe]
[
mysqld_safe]
# Increase
amount of open files allowed per process
# Increase
the amount of open files allowed per process. Warning: Make
#
Warning: Make sure you have global system limit high enough
#
sure you have set the global system limit high enough! The high value
#
The high value is required for
large number of opened tables
#
is required for a
large number of opened tables
open-files-limit
=
8192
open-files-limit
=
8192
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