InnoDB on a 256MB VPS


I am really new to MySql tuning. I have just set up a 256MB VPS, running nginx and a mongrel rails cluster (3 processes). The mongrels take up about 70MB each … so I think I have about 32MB for MySql.

All my tables need to use InnoDB.

Are there any ‘templates’ around for my.cnf for a similar set up to this?

Can I use the default my.cnf, or is it best to tune for InnoDb?

When InnoDB settings, for example, speak of setting the buffer to 60-80% of memory would that refer to the 32MB, or the total 256MB? If I set this buffer, do I need to reduce anything else from the default set up?

ANY help or guidance would be really really appreciated.


That 80% is referring to RAM on a dedicated MySQL server.

So in your case when you are running other applications that consume RAM on the same server you should tune MySQL to only use the free RAM.
Which in your case should amount to the 32MB (which by the way is almost ridiculously low). But if your DB actually is that small then it shouldn’t be a problem.

Otherwise as a rule I think that you should aim for that the entire DB can fit in the InnoDB buffer pool. Because as soon as the DB needs to start to read data from disk the performance penalty is huge in comparison.