Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Dumb question: I have 4 gb of RAM and my dataset is around 500 mb. How can I make sure MySQL/InnoDB is keeping my dataset in RAM?

like image 494
Carson Avatar asked Jul 26 '11 05:07

Carson


People also ask

How do I know if my MySQL memory Utilisation is high?

To view the running queries, mysql> SHOW [FULL] PROCESSLIST; Viewing the current processlist reveals queries that are running actively or even idle or sleeping processes.

How much RAM does MySQL use?

The default configuration is designed to permit a MySQL server to start on a virtual machine that has approximately 512MB of RAM. You can improve MySQL performance by increasing the values of certain cache and buffer-related system variables.


2 Answers

MySQL Tuning Primer gives you lots info and recommendations regarding your MySQL performance. Keep in mind (and it will warn you), the instance should be running for a period of time to give you accurate feedback.

like image 183
Coder1 Avatar answered Sep 17 '22 12:09

Coder1


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

like image 43
Maxim Krizhanovsky Avatar answered Sep 19 '22 12:09

Maxim Krizhanovsky