|latest crazy idea: iscsi on mysql cluster
||[Dec. 7th, 2004|09:57 pm]
So these things are like $4k for a 1GB scsi disk, or $7k for 4GB.
But what if you did this all in software, over multiple redundant machines?
The pieces are almost all available:
Follow the layers:
-- database journal (innodb logs) or filesystem journal, on:
-- Linux iscsi initator (presents block device over iSCSI), talking to:
-- iscsi target (local machine?), talking to:
-- 2x or 4x: MySQL Cluster
CREATE TABLE sector (
devid .... SMALLINT UNSIGNED NOT NULL,
sector ... INT UNSIGNED NOT NULL,
PRIMARY KEY (devid, sector),
All we'd have to write is the iscsi target, which would be userspace.
Would it be as fast as a SCSI or FiberChannel SSD device? Probably not.
Would it be faster than a disk that had to physically spin to fsync or seek to do random I/O? Maybe.
It's that Maybe that inspires me.
If anything, it's a dorky project to learn the iSCSI protocol better. Who knows what the MySQL Cluster internal wastage is. I know memcached is about 33% internal fragmentation. (not that I'd use memcached ... the point is reliability, and MySQL cluster is designed for that, whereas memcached is cache.)
Also, clarification: I wouldn't actually use SQL or the MySQL protocol. I'd do this as an NDB client. (NDB = MySQL cluster)
Update: To add confusion with my talk of NDB above, I'd like to add that it'd probably be easier to prototype this all with NBD (Network Block Device) first, since the protocol is so much simpler. That's probably what I'll do....
Not to long ago, they were $20K for 1GB and the vendor made us feel special that he gave us price break on the next one for only $10K.
I think you already know that one, but anyway:Linux::NBD
2004-12-08 10:36 am (UTC)
No, I didn't!
Heh... and it's by Marc Lehmann. Everything he does is crazy cool. (Like Linux::AIO, which we love...)
ich kenne Marc ziemlich gut, schlief nur einen Meter oder so von mir in der Grundausbildung (Bundeswehr/Dtl), wenn er das liest weiß er wer ich bin...es gibt Leute die man sofort vergißt ohne es zu wollen, Leute die man nach vielen Jahren vergißt und solche die man nie vergißt, Thorsten.
I'm not sure why someone would even bother using one of these things. Truth is, it would be SO much cheaper to use DDR2 RAM with an internal battery backup that lasted say, 2 weeks or something. It could even be faster, since SRAM is slower than DDR2... and realistically the only time this type of solution would be useful is in an online system with uber high performance requirements... it's not like you need the ability to down the system for a year at a time and have the contents of the drive stick around. Skip it, build a custom product and market it to the world for half the price... make a billion ;)
I've never understood the idea behind iSCSI. Take a protocol (TCP) built to run over flaky, long, slow networks, that has no concept of packets, and bad latency, and use it to communicate with a disk, which wants move boatloads of data in packets with low latency. And then it's promoted as some kind of high-performance protocol!