On 19/02/2006 10:57 p.m., Kevin Burton wrote:
I was talking to a friend tonight about how they use NBD to run a single system image in memory.

NBD (Network Block Device) allows one Linux box to export a block device and for you to mount it on another filesystem. For the memory component they just use a ram disk.


What if you booted a MySQL install and told it to use NBD mounted memory? Theoretically you could build MUCH cheaper and MUCH faster clusters. Your DB writes would still back to the local (RAID) filesystem but your innodb buffer pool and other buffers would be running out of swap and into your network memory subsystem.

This would allow you to have a HUGE buffer for MySQL. Buffer your whole damn database in MEMORY.

The main downside I can see is fault tolerance if the ethernet port was pulled. The box would fail. Of course at this point its a bit like pulling a SCSI cable out.

If this turns out to be a good way to scale MySQL someone could just pay to have NBD enhanced to support fault tolerance with mirror nodes.

Thoughts?


Why would this be better than just using MySQL Cluster (NDB)?

With this method you're reliant on one single server, all you get is a large space for buffering. Which could be good if your database is mostly static and you can take advantage of query caching and key buffers, and your operating system may be able to buffer the entire database into memory. But would be less advantageous if you have many updates.

But it doesn't really give you any scalability, since everything has to go through the one MySQL server still. It's just a MySQL server with lots and lots of high-speed swap space.

And I'd imagine it would be very fault-prone. If any of the "buffer" servers was to die, it would most likely take the entire database with it (operating systems can't handle losing swap). And even if you solved that, the single MySQL server would still be a single point of failure.

If you have many servers with lots of RAM, MySQL Cluster by contrast enables you to run your database in RAM and make real gains in scalability and fault tolerance (although it is a little rough round the edges still).

-Simon

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to