MySQL read_buffer_size set how much appropriate _mysql

Source: Internet
Author: User
Tags server memory

Key_buffer_size + (read_buffer_size + sort_buffer_size) *max_connections = 458624 K

Read_buffer_size: Is the MySQL read into the buffer size. A request to sequentially scan a table allocates a read buffer, which is allocated a memory buffer by MySQL. The read_buffer_size variable controls the size of this buffer. If the sequential scan request for a table is very frequent, and you think that frequent scans are too slow, you can improve performance by increasing the value of the variable and the size of the memory buffer.

The following are settings for 16g memory

Read_buffer_size = 1M

The personal machine is 32G, the general database is used to store the data, and the MySQL is rarely used so I set it to 2M or 3M.

Online update system MySQL database server parameter optimization MYCNF,16G memory 8 core CPU

Business scenario: Backstage support mobile phone online update system, DB server memory 16g,8 Core, Dell PC server.

qps:200 around
Tps:1 about one minute 50

Sort_buffer_size = 32M big, 8M can
Read_buffer_size = 32M big, 8M can
Read_rnd_buffer_size = 16M large, 8M can
Table_open_cache = a small, recommended to 2048

Max_allowed_packet = 5M
Small , the proposed change to 16M

tmp_table_size=64m
Small, the proposed change to 2 g

Innodb_buffer_pool_size = 3000M
Small, changed to DB Server total memory of 60% to 80%

Innodb_additional_mem_pool_size = 20M small, changed to 128M

Join_buffer_size This parameter why not see, must set the value, Join_buffer_size = 8M must be filled in, this is associated with join table, very important.

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.