High performance MySQL (8) Optimizing Server configuration: Security and stability

Source: Internet
Author: User
Tags mysql table definition

In the previous section we've covered some options, and there are some remaining important options, and let's go on to explain:

First, the basic configuration

Tmp_table_size and Max_heap_table_size

These 2 settings control how much memory can be used by the memory temp table using the memory engine. If the Hermit memory temp table is larger than these 2 settings, it will be converted to a disk temp table. The Hermit temp table is a table that is not created by itself but is created by the server because of the intermediate results of saving the query in execution.

Temporary tables are best to stay in memory, but if they are large, it is better to actually use the disk, or you may overflow memory.

You can use Show status to see how often temporary tables are used.

Max_connections

The role of this setting to ensure that the server is not overwhelmed by the surge of application links.

Thread_cache_size

Thread cache size, you can observe the threads_connected state variable to find the maximum and minimum values in general. You can also observe threads_created, if the value is large or constant, you may need to increase the thread_cache_size. Check the threads_cached to see how many threads are already in the cache.

Table_cache_size

This should be set large enough to avoid the need to reopen and reparse the table definition. You can examine the variable by observing the change in the value of the open_tables. If you see a large change in opened_tables per second, the Table_cache value may not be large enough.

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.