DEV Community

Discussion on: MySQL : InnoDB : RAM

Collapse
 
anurbol profile image
Nurbol Alpysbayev • Edited

Why do you think they are held in memory? They are not. MySQL stores data on disk. However, there is an in-memory mode, but it is off by default. However, if you enable it, the WHOLE DB will constantly will live in memory, i.e. if it has 3GB of data, you will have 3GB of RAM taken for that. That is from my experience.

Collapse
 
mrbenosborne profile image
Ben Osborne

Basically I have a 40gb table which is not accessed frequently however, I only have 10gb left of RAM, which made me think that it was holding that table.

Total server RAM is 61GB, AWS Aurora.

Collapse
 
anurbol profile image
Nurbol Alpysbayev • Edited

Dian Fay may be correct about buffer pool. But I don't think it can take 50 Gb of RAM. Can it be your application that extracts data from DB and holds it in memory? I bet it is, especially if it is not Node.js or PHP app, but persistent daemon-like e.g. Java app.