MySQL Performance Optimization learning note (6) Database configuration optimization & Hardware optimization

Source: Internet
Author: User


First, the operating system configuration optimization:
1. On the network side, modify the/etc/sysctl.conf file, increase the number of TCP supported queues, reduce the resource recovery when disconnected.
2. Limit the number of open files. Modify the/etc/security/limits.conf file to add a bit of content to modify the limit on the number of open files.
3. Turn off firewall software such as Iptables,selinux.

Second, System configuration optimization
innodb_buffer_pool_size--recommended for 75% of total memory
innodb_buffer_pool_instances--can control the number of buffer pools
InnoDB Log buffer size
Innodb_read_io_threads, indoor_write_io_threads--determines the number of IO processes to read and write, default to 4
innodb_flush_log_at_trx_commit--Key Parameters
innodb_file_per_table--key parameters, controlling each table to use a separate table space, default to OFF, that is, all tables will establish shared tablespace. Recommended to ON, when deleting a table, you can reclaim space in time and improve IO efficiency
Innodb_stats_on_metadata configure MySQL to refresh the statistics of the InnoDB table.


Iii. third-party configuration tools
Https://tools.percona.com/wizard


Four, hardware optimization
CPU: The single core frequency is high, do not exceed 32 cores.
IO:RAID0 multiple disks connected to one hard drive, IO best
RAID1 Single Backup
RAID5 Parity Recovery
The combination of raid1+0 1 and 0.
Disk array: 1. Often used for high-availability 2. Some storage array sequential read and write efficiency is high, but random read and write unsatisfactory.

MySQL Performance Optimization learning note (6) Database configuration optimization & Hardware optimization

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.