Re:No to SQL? Anti-database movement gains steam
by jbellis on Thursday July 02, 2009 @10:22AM
(#684425)
Cassandra uses log-structured merge storage, so reads really _are_ slower than writes. (But still much faster than MySQL!)
You can (usually) make reads faster by throwing things like memcached at the problem. Writes are harder. So I think this is the right tradeoff for a modern system.
/Cassandra dev
These numbers have been taken from p.21 of the linked PDF by the Facebook engineer Avinash Lakshman where it shows this MySQL vs Cassandra comparison:
"MySQL > 50GB Data Writes Average : ~300ms Reads Average : ~350ms Cassandra > 50GB Data Writes Average : 0.12ms Reads Average : 15ms"
Which I'm guessing actually means: with a database table which is more than 50GB total size they have measured individual row accesses at these speeds. Maybe Avinash has accidentally transposed the read and write figures - I can't think why the read would be slower than the write.
15ms to write a row to disk seems possible given that a fast modern disk
http://www.seagate.com/docs/pdf/datasheet/disc/ds_cheetah_15...
has a latency of 2ms and seek time of 4ms and a sustained transfer rate of about 100MB/s. The track to track time is only 0.4ms so maybe if you just wrote all the data to disk serial-log-style you could reconstruct from the log after a failure and handle all reads from memory. I don't know Cassandra. Obviously, from these figures, the disk couldn't do a row read in 0.12ms.