MySQL Database insertion speed adjustment

Source: Internet
Author: User

Environment Introduction:

CentOS 6.5

MySQL 5.5.40

Hardware: 4-core, 4GB

Reference Links:

Http://dev.mysql.com/doc/refman/5.5/en/insert-speed.html
Http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html

Due to the rapid expansion of business volume, the demand for write speed is increasing, it is estimated that data insertion speed from 2000 per minute, adjusted to 100 per second, i.e. 6,000 per minute;
Workaround:
1. Optimize the database host IO;
2. Adjust the mysql corresponding parameters.
Start processing:
1. Host IO optimization
A. Set the database as a stand-alone tablespace and place each table space on a different hard disk;
B. Close the host other processes that affect IO.
2. Adjust the my.cnf parameters to improve the MySQL write speed

Innodb_autoextend_increment =128m

Innodb_log_buffer_size =32m

innodb_log_file_size=128m

The above 3 parameters are gradually changed to the corresponding size

Innodb_flush_log_at_trx_commit = 0



MySQL Database insertion speed adjustment

Related Article

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.