MySQL Tuning parameters

Source: Internet
Author: User

Key_buffer_size

Meaning: The buffer size used for the index block, increasing the index (for all read and multiple writes) that it can get better processing.

Impact: The impact on the MyISAM table is not very large, MyISAM uses the system's cache to store the data, so machine memory that uses MyISAM tables is quickly exhausted. However, if the value is set too large (for example, greater than total memory 50%), the system is converted to a page and becomes extremely slow. MySQL relies on the operating system to perform file system caching when data is read, so you must leave some room for the file system cache.

Recommendation: Set 25% of the memory first to observe performance changes.

Table_open_cache

Meaning: All threads open the descriptor cache of the table

Impact: Increasing this value can increase the number of file descriptors required by the mysqld. You can avoid the overhead of opening data tables frequently. Opening a table can be expensive because MyISAM will identify the file header of the Myi file as being used, so doing this in memory is better. The country needs to open the table for each thread, and the larger the number of connections, the greater the value will be.

Table_open_cache>= max_connection*2, when some tables are open, you need two file descriptors, such as MyISAM table, index, temp table, and so on. Self-Linking query statements, additional open a file for the table (the targeted setting is to find all the most complex query statements related to the database, including the self-linking left/right/inner/outer join and group statistics statements) to see how many data tables these links will open, Set this value to n

Show status like ' Opened_tables ', if the value is large, increase the Table_open_cache value.

Thread_cache_size

Meaning: The number of threads that the cache can reuse.

Impact: This parameter is set

MySQL Tuning parameters

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.