How to optimize high cpu usage of mysql. ini

Source: Internet
Author: User
Tags mysql tutorial high cpu usage

Mysql tutorial. ini cpu too high Optimization Method

The larger the tmp_table_size = 200 m tmp_table_size, the more likely it is to be converted to disk tmp table.

Small

Php tutorial program page mysql closed in time

Set mysql timeout


Low-priority-updates


Low_priority_updates = no; set the read priority

Wait_timeout = 10; about 10 seconds.

Table_cache = 1024 the larger the physical memory is, the larger the setting will be. The default value is 2402. The optimal value is adjusted to 512-1024.


According to General mysql memory computing companies:
1) used by the system. Assume that 800 m is reserved;
2) Exclusive thread, about 4.5 gb = 151*(10 m + 10 m + 5 m + 5 m + 512 k), the composition is roughly as follows:
Sort_buffer_size: 10 m
Join_buffer_size: 10 m
Read_buffer_size: 5 m
Read_rnd_buffer_size: 5 m
Thread_stack: 512kb
3) myisam key cache
Key_buffer_size 2.4g
4) innodb buffer pool: Ignore. Currently, the innodb Storage engine table does not exist.

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.