How can I make sure MySQL is using all available memory?

Dumb question: I have 4 GB of RAM, and my data set is about 500 MB. How can I make sure MySQL / InnoDB saves my dataset in RAM?

+6
source share
3 answers

MySQL Tuning Primer gives you a lot of information and recommendations regarding MySQL performance. Keep in mind (and he will warn you), the instance must work for a certain period of time to give you accurate feedback.

+6
source

set innodb_buffer_pool to 3G - InnoDB will load as much data as possible in the buffer pool.

+6
source

Darhazer is right (I will vote for him, but I have no reputation points). It is generally recommended that you set innodb_buffer_pool_size to 70-80% of the memory, although it is really more difficult, since you need to consider how much RAM other parts of your system actually use.

+1
source

Source: https://habr.com/ru/post/893552/


All Articles