My-innodb-heavy-4g.cnf

Source: Internet
Author: User


FTP TFTP Telnet SMTP SNMP TCP UDP DNS

[Client] # # # #客户端

Port = 3306 # # # #mysql客户端连接时的默认端口号

Socket =/application/mysql-5.5.32/tmp/mysql.sock

[Mysqld]

Port = 3306 # # # #mysql服务器监听的默认端口

Socket =/application/mysql-5.5.32/tmp/mysql.sock

Back_log = # # # #是指保持在操作系统监听队列的连接数量, that is, the number of connections before the MySQL Connection Manager thread processes them

max_connections = # # # # #MySQL允许的并发会话的最大数量

Max_connect_errors = ten # # # #每个主机允许的最大错误数量

Table_open_cache = 2048 # # # #所有线程打开表的数字, file descriptor size

Max_allowed_packet = 16M # # # #服务器一次能处理的最大的查询包的值, and the largest query the server program can handle

Binlog_cache_size = 1M # # # #在一个事务中, binary logs are able to handle the maximum number of cached SQL statements, if you frequently use complex statement transactions,

You can increase this value for better performance, and all the statements in the transaction will be cached in Binlog and written to the binary log immediately after a one-time commit.

If the transaction is larger than this value, the temporary file on the disk is replaced with a buffer that is allocated on each link when the transaction first changes state.

Max_heap_table_size = 64M # # # #独立的内存表所允许的最大容量

Read_buffer_size = 2M # # # #MySql读入缓冲区大小.

Read_rnd_buffer_size = 16M # # # #是MySql的随机读缓冲区大小.

Sort_buffer_size = 8M # # # The sort buffer is used to handle the sort caused by the order by and the group by queue

Join_buffer_size = 8M # # # #此缓冲被使用来优化全联合 (full JOINs Union without index).

Thread_cache_size = 8 # # # #我们在cache中保留多少线程用于重用

Thread_concurrency = 8 # # # #此允许应用程序给予线程系统一个提示在同一时间给予渴望被运行的线程的数量.

Query_cache_size = 64M # # # #查询缓冲的大小. Query buffering is often used to buffer the results of a SELECT and the next time the same query

The direct return result is no longer performed.

Query_cache_limit = 2M # # # #只有小于此设定值的结果才会被缓冲

Ft_min_word_len = 4 # # # # # # is the smallest word length indexed by the full text.

Default-storage-engine = MYISAM # # # #当创建新表时作为默认使用的表类型

Thread_stack = 192K # # # #线程使用的堆大小. Memory of this capacity is reserved on each connection

Transaction_isolation = Repeatable-read

Tmp_table_size = 64M # # # # #内部 (in-memory) the maximum size of a temporary table

Log-bin=mysql-bin # # # #打开二进制日志功能.

binlog_format=mixed # # # #设定记录二进制日志的格式, there are three formats, based on the statement statement, Row Row,

Mixed Mode Mixed

Slow_query_log # # # #记录慢查询,

Long_query_time = 2 # # # #所有的超过这个参数时间的请求将被作为慢查询

Server-id = 1 # # # #唯一的服务标识号, its value is between 1 and 2^32-1,

This value is required to be set on the primary server and from the server.

His default parameter is 1, if the host does not need to be set, but if this option is omitted, MySQL will not take effect as master.

Key_buffer_size = 32M # # # #关键词缓冲的大小, commonly used to buffer the index block of a MyISAM table.

Bulk_insert_buffer_size = 64M # # # #MyISAM Use a special tree-like cache to make a burst insert,

(These inserts are, insert ... SELECT, INSERT ... VALUES (...), (...), ..., and LOAD DATA INFILE) are faster.

This variable limits the number of bytes in the buffer tree per process.

Myisam_sort_buffer_size = 128M # # # #当需要对于执行REPAIR, OPTIMIZE, ALTER statement when rebuilding an index,

MySQL will allocate this cache, and load DATA infile will load into a new table, which will be carefully allocated according to the maximum configuration of each thread.

Myisam_max_sort_file_size = 10G # # # #当重新建索引 (repair,alter,table, or Load,data,tnfile),

MySQL is allowed to use the maximum value for temporary files.

Myisam_repair_threads = 1 # # # #如果一个表拥有超过一个索引, MyISAM can use more than one thread by parallel ordering

To fix them.

Myisam_recover # # # #自动检查和修复没有适当关闭的 MyISAM table.

Innodb_additional_mem_pool_size = 16M # # # #附加的内存池被InnoDB用来保存 metadata Information

Innodb_buffer_pool_size = 2G # # #InnoDB使用一个缓冲池来保存索引和原始数据,

Innodb_data_file_path = ibdata1:10m:autoextend # # # #InnoDB saves the data in one or more data files as a tablespace.

Innodb_write_io_threads = 8

Innodb_read_io_threads = 8 # # # #用来同步IO操作的IO线程的数量.

innodb_thread_concurrency = # # # # #使用InnoDB引擎, the number of threads allowed by the kernel, this best value depends on the application,

The hardware also has the operating system scheduler. A value that is too high will certainly cause thread jitter.

Innodb_flush_log_at_trx_commit = 1 # # # #如果设置为1, InnoDB flushes (fsync) the transaction log to disk after each commit,

Innodb_log_buffer_size = 8M # # # #用来缓冲日志数据的缓冲区的大小.

Innodb_log_file_size = 256M # # #在日志组中每个日志文件的大小,

Innodb_log_files_in_group = 3 # # # #在日志组中文件的总量, usually 2-3 is enough

innodb_max_dirty_pages_pct = # # # #在InnoDB缓冲池中最大允许的脏页面的比例.

Innodb_lock_wait_timeout = # # # # #在被回滚前, how long a InnoDB transaction should wait for a lock to be approved.

[Mysqldump]

Quick

Max_allowed_packet = 16M

[MySQL]

No-auto-rehash

[Myisamchk]

Key_buffer_size = 512M

Sort_buffer_size = 512M

Read_buffer = 8M

Write_buffer = 8M

[Mysqlhotcopy]

Interactive-timeout

[Mysqld_safe]

Open-files-limit = 8192 # # # #每个程序允许打开文件的数量


My-innodb-heavy-4g.cnf

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.