Get the App
SLTechnology News&Howtos  ›  Database  › 

What are the mysql cache adjustments?

Shulou Source: shulou.com Published: 2022-05-31 13:58:57 10月03日 Update

This article introduces the relevant knowledge of "what are the mysql cache adjustments?". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

After that, innodb memory (innodb_buffer_pool_size) can be adjusted online. This is for dba. It's nice, but you need to pay attention to the adjustment:

It is not adjusted small or large at will, but follows certain rules. Here, the innodb_buffer_pool_chunk_size parameter, which controls the memory size rule, is introduced.

The default innodb_buffer_pool_chunk_size value is 128m (134217728). This value is calculated in terms of cache pools. So when calculating innodb_buffer_pool_size, you have to include innodb_buffer_pool_instances.

Summary: the size of innodb_buffer_pool_size is based on innodb_buffer_pool_chunk_size*innodb_buffer_pool_instances as the minimum cardinality.

The following is calculated as an example of innodb_buffer_pool_instances=8,innodb_buffer_pool_chunk_size=128M:

Innodb_buffer_pool_size (min) = innodb_buffer_pool_chunk_size*innodb_buffer_pool_instances=1024M

This means that a minimum of 1 gigabyte of memory must be given during initialization. At the same time, this 1 G is also the minimum cardinality to increase or decrease memory in the future.

If you are not satisfied with 1G, such as 1000m, in my.cnf, you will automatically make up 1G at startup. By the same token, if it is not an integer multiple of 1024, it will directly fill 1024 instead of rounding, for example, 2000m, the start is 2048m, 2100m is 3072m.

This is the end of the content of "what are the mysql cache adjustments?" thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Adjustment memory cache minimum that is content parameters cardinality size more knowledge rules good practical rounded learned and then at the same time dilemma reality Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology vpn Shulou Information MySQL OPPO Reno