I would like to start this chapter by showing you some numbers published by Jeff Dean (a Google fellow, http://www.cs.cornell.edu/projects/ladis2009/talks/dean-keynote-ladis2009.pdf):
Operation |
Time taken | |
---|---|---|
Send 1K bytes over 1 Gbps network |
10,000 ns |
0.01 ms |
Read 4K randomly from SSD* |
150,000 ns |
0.15 ms |
Read 1 MB sequentially from memory |
250,000 ns |
0.25 ms |
Round trip within the same datacenter |
500,000 ns |
0.5 ms |
Read 1 MB sequentially from SSD* |
1,000,000 ns |
1 ms |
Disk seek |
10,000,000 ns |
10 ms |
Send packet CA->Netherlands->CA |
150,000,000 ns |
150 ms |
The preceding table tells us the average cost of a system call performed to complete an operation. Typically, a read/write request in Cassandra involves multiple of the above operations.