I'm trying to think of ways to make mysql faster. Is there a proven way of storing it in ram to allow it to work faster?
|
show 1 more comment
feedback
|
|
How about the MEMORY Storage Engine? Another option would be to create a ramdisk and use MyISAM or INNODB tables within that. I would imagine, though, that performance would be better using the MEMORY Storage Engine, due to the fact that it was designed from the ground up to be stored in memory, whereas the other table types operate under the assumption that they're being stored on disk. | |||||||
feedback
|
|
First, do yourself a favor and take the MEMORY engine suggestions with a large grain of salt. Unless, of course, you don't need any of the following:
If you don't need any of those, then you shouldn't be using MySQL. Use a simple key-value store like memcached. If you need any of those (hint: you do), then use InnoDB, as much RAM as you can afford, and a properly configured | |||||
feedback
|
|
RAM SAN very very expensive but mind blowing IO. RAMdisk is a very very bad idea because in the event of a loss of system power or a fatal system error the RAMdisk is gone as it is in RAM. | |||
|
feedback
|
You might want to put some monitor (like munin) on your server to make sure that mysql is the real problem, usually it's very disk expencive when you're dealing with non cached queries. If everything fails you will need to expend some coin getting a SSD storage solution. | |||
|
feedback
|
|
Play with the MEMORY storage engine as ErikA suggested. But make sure you are also optimizing all of your query cache, thread cache and buffer settings. mysqltuner.pl is a great starting point. | |||
|
feedback
|
key_bufferoption is usually given a lot of RAM inmy.cnfto have all indexes in memory. – ring0 Sep 25 '10 at 1:43