Carson
Carson

Reputation: 17751

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?

Upvotes: 6

Views: 2323

Answers (3)

JadoInt
JadoInt

Reputation: 11

Darhazer is right (I'd vote him up but don't have the rep points). It's generally recommended to set innodb_buffer_pool_size to 70-80% of memory although it's really more complicated than that since you need to account for how much RAM other parts of your system is actually using.

Upvotes: 1

Maxim Krizhanovsky
Maxim Krizhanovsky

Reputation: 26699

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

Upvotes: 6

Coder1
Coder1

Reputation: 13321

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.

Upvotes: 6

Related Questions