20. periodic commit log adds mutation to queue
then acknowledges.
Commit Log is appended to by a single
thread, sync is called every
commitlog_sync_period_in_ms.
21. CommitLog tests...
10,000 Inserts,
50 Columns per Row
50 bytes per Column
22. Request latency and commitlog_sync_period_in_ms...
10,000 ms 10 ms
220
208
Latecy Microseconds
195
183
170
85th 95th 99th
23. batch commit log adds mutation to queue
and waits before acknowledging.
Writer thread processes mutations for
commitlog_sync_batch_window_in_ms
duration, then syncs, then signals.
24. Request latency and commitlog_sync_batch_window_in_ms...
50 ms 0 ms
800
750
Latecy Microseconds
700
650
600
85th 95th 99th
26. Engage the rocket powered
sky crane!
(Also time to merge the mutation with the current Memtable.)
27. Merge mutation...
Row level Isolation provided
via SnapTree.
(https://github.com/nbronson/snaptree)
28. 00 REM Cassandra for C64
05 REM Clone row_cols into my_cols
10 GOSUB 1000
20 FOR col = write.first_col TO write.last_col
25 REM Add or Reconcile col with my_cols
30 GOSUB 2000
40 IF my_cols != row_cols THEN GOTO 05
50 NEXT col
55 REM Atomic swap row_cols with my_cols
60 GOSUB 3000
70 IF swapped_cols = FALSE THEN GOTO 05
41. Locating row start per SSTable...
1. Check BloomFilter
2. Read KeyCache
3. Read Index Samples, seek
and partial scan -Index.db
(Step 3 only used if KeyCache lookup missed.)
56. CF read latency and row_cache_size_in_mb...
row_cache_size_in_mb=0 and key_cache_size_in_mb=100mb
row_cache_size_in_mb=100mb and key_cache_size_in_mb=0
260
195
Latecy Microseconds
130
65
0
85th 95th 99th
57. Slice by Name (excluding Counter Columns)...
1. Order SSTables by maxTimestamp.
2. Break if SSTable covered by previous Row
Tombstone.
3. Remove irrelevant Columns from query.
4. Eagerly read Columns from SSTable.
5. Hoist Columns into current Size Tier.
58. When reading by Column name...
A query on a wide row must
read the entire Column Index.
59. Column Index tests...
Read first Column by name from 1,200
Columns.
Read first Column by name from 1,000,000
Columns.
60. CF read latency and Column Index...
First Column from 1,200 First Column from 1,000,000
6,000
4,500
Latecy Microseconds
3,000
1,500
0
85th 95th 99th
61. When reading by Column name...
A narrow query on a wide
row performs better.
62. Name Locality tests...
1,000,000 Columns
50 bytes per Column
Read 100 Columns from middle of row.
Read 100 Columns from spread across row.