Optimize mysql servers and mysql servers

Source: Internet
Author: User

Optimize mysql servers and mysql servers

1. Run the show variables and show status commands to view the static server parameter values and dynamic running status information of MySQL.

2. You can use mysqld -- verbose -- help | more to view the definition of a parameter. Add grep filter.

3. key_buffer_size is used for the global index cache of the MyISAM engine.

4. Number of table caches opened by table_cache database users. You can use open_tables (the number of opened tables currently) to determine the size.

5. innodb_buffer_pool_size defines the maximum memory buffer size for table data and index data of the InnoDB Storage engine.

6. innodb_flush_log_at_trx_commit controls the operation time when data in the buffer zone is written to the log file and the data in the log file is refreshed to the disk. Affects performance and data security.

The default value is 1, which is the safest.

7. innodb_additional_mem_pool_size the size of the memory pool storing the data structure and other internal data structures will automatically increase, and there is no need to increase too much.

8. When innodb_lock_wait_timeout is deadlocked, roll back after the specified time.

9. Whether innodb_support_xa supports distributed transactions. It is supported by default.

10. innodb_log_buffer_size: the log cache size. Set the memory size for one second.

11. innodb_log_file_size the size of files in each day in a log group.

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.