MySQL Tutorial configuration file details (iii)

Source: Internet
Author: User

#mysql version 5.4 is set to (better results in the following ways during testing):

Innodb_read_io_threads = 12innodb_write_io_threads =6

# If you find that the InnoDB tablespace is corrupted, setting this value to a value other than 0 may help you export your table.

# Start from 1 and increase this value to know you can successfully export the table.

#innodb_force_recovery =1

# The number of allowed threads within the InnoDB core.

# The optimal value depends on how the application, hardware, and operating system are scheduled.

# High values can cause mutually exclusive bumps on the thread. The default is 16, where we don't make the best limit. So set to 0innodb_thread_concurrency =0

# If set to 1,innodb will flush (fsync) The transaction log to disk after each commit,

# This provides complete ACID behavior.

# If you are willing to compromise on transactional security, and you are running a small food, you can set this value to 0 or 2

To reduce disk I/O caused by the transaction log

# 0 means that the log is written only about every second and the log file is flushed to disk.

# 2 means that log files are written to the log file after each commit, but the log files are flushed to disk only about once per second.

# 0 with 1 and 2 performance will be more than 5 times times, the strong list of recommendations is 0, the maximum loss of 1 seconds of data. Innodb_flush_log_at_trx_commit = 0

# speed up the InnoDB shutdown. This prevents InnoDB from doing a full purge and inserting a buffer merge when it is closed.

# This can greatly increase the shutdown time, but instead the InnoDB may do so at the next boot.

#innodb_fast_shutdown

# The size of the buffer used to buffer the log data.

# When this value is nearly full, InnoDB will have to flush the data to disk.

# because it's basically refreshed every second, there's no need to set this value too large (even for long transactions)

Innodb_log_buffer_size = 8M

# The size of each log file in the log group.

# You should set the total size of the log file to the size of your buffer pool 25%~100%

# to avoid unnecessary buffer pool refresh behavior in log file overwrite.

# Regardless, note that a large log file size increases the time that is required for the recovery process. Innodb_log_file_size = 256M

# The total number of files in the log group.

# usually it's better to have one or both. Innodb_log_files_in_group= 3

The location of the log file where the #InnoDB is located. The default is MySQL's datadir.

# You can assign it to a standalone hard drive or a RAID1 volume to improve its performance

#innodb_log_group_home_dir

# The scale of the maximum allowable dirty pages in the InnoDB buffer pool.

# If the limit is reached, InnoDB will start refreshing them to prevent them from interfering with the Clean data page.

# This is a soft limit and is not guaranteed to be absolutely enforced. innodb_max_dirty_pages_pct= 90

#InnoDB the method used to refresh the log.

# table spaces always use the double write Refresh method

# The default value is "Fdatasync" and the other is "O_dsync".

# O_dsync is to be configured innodb_max_dirty_pages_pct to use.

#innodb_flush_method =o_dsync

# How long a InnoDB transaction should wait for a lock to be approved before being rolled back.

# InnoDB automatically detects the transaction deadlock in its own lock table and rolls back the transaction.

# If you use the lock TABLES directive, or use a transaction other than InnoDB in the same transaction

Secure Storage Engine

# Then a deadlock can happen and InnoDB can't notice.

# This timeout value in this case is very helpful for solving this problem. Innodb_lock_wait_timeout = 120

Linux Service customization simplification. Vim/etc/inittab

Id:3:initdefault: #3为命令行, you do not need to start the desktop.

3,4,5,6 comments out, not so many TTY, save resources.

#Run Gettys in Standard runlevels

1:2345:respawn:/sbin/mingettytty1

2:2345:respawn:/sbin/mingettytty2

#3:2345:respawn:/sbin/mingetty tty3

#4:2345:respawn:/sbin/mingetty Tty4

#5:2345:respawn:/sbin/mingetty tty5

#6:2345:respawn:/sbin/mingetty tty6

Services required under the DB Server (Simplified):

Messagebus

2,3,5

On

Mysqld

2,3,5

On

Network

2,3,5

On

Ntpd

2,3,5

On

Snmpd

2,3,5

On

Sshd

2,3,5

On

Syslog

2,3,5

On

Xfs

2,3,5

On

xinetd

2,3,5

On

Service init on/offacpid 2,3,5 on Cpuspeed 2,3,5 Oncrond

http://user.qzone.qq.com/2858415798/blog/1451869352


qq:2858415798

MySQL Tutorial configuration file details (iii)

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.