List:General Discussion« Previous MessageNext Message »
From:Kevin Burton Date:February 19 2006 9:57am
Subject:Using Network Block Device on Linux to build HUGE/cheap memory-base MySQL boxes.
View as plain text  
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.

More info here:

http://www.ussg.iu.edu/hypermail/linux/kernel/9704.3/0492.html

Basically they just buy cheap 1U boxes with 4-8 gig and then mount  
them... this way they allow the process to allocate as much memory as  
it wants and it will them start swapping but instead of uses disk it  
starts using the remote memory.  Since gigabit ethernet is now FASTER  
than most disk installs in terms of throughput this would seem like a  
win/win.

Here's the idea I had though.

MySQL (except for MySQL cluster) doesn't scale if you need to run an  
image across 2 boxes.  For example you can't currently take two boxes  
and run your dataset on BOTH boxes at the same time for double  
scalability.

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?

Kevin

Kevin A. Burton, Location - San Francisco, CA
       AIM/YIM - sfburtonator,  Web - http://www.feedblog.org/
GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04


Thread
Using Network Block Device on Linux to build HUGE/cheap memory-base MySQL boxes.Kevin Burton19 Feb
  • Re: Using Network Block Device on Linux to build HUGE/cheap memory-baseMySQL boxes.Simon Garner20 Feb