MySQL database insertion speed adjustment, mysql database insertion

Source: Internet
Author: User

MySQL database insertion speed adjustment, mysql database insertion

Environment Introduction:

CentOS 1, 6.5

MySQL 5.5.40

Hardware: 4-core, 4 GB

Reference link:

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 and increasing demand for writing speed, it is estimated that the data insertion speed should be adjusted from 2000 per minute to 100 per second, that is, 6000 per minute;
Solution:
1. Optimized Database Host IO;
2. Adjust the MySQL parameters.
Start processing:
1. Host IO Optimization
A. Set the database to an independent tablespace and place each tablespace on a different hard disk;
B. Disable other processes that affect IO on the host.
2. Adjust the my. cnf parameter to improve MySQL write speed

Innodb_autoextend_increment = 128 M

Innodb_log_buffer_size = 32 M

Innodb_log_file_size = 128 M

The preceding three parameters are gradually changed to the corresponding size.

Innodb_flush_log_at_trx_commit = 0



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.