Manylogs
Improving CMR/SMR Disk Bandwidth & Latency
† Tiratat Patana-anake, Vincentius Martin†, Nora Sandler, Cheng Wu, and Haryadi S. Gunawi
Manylogs Improving CMR/SMR Disk Bandwidth & Latency Tiratat - - PowerPoint PPT Presentation
Manylogs Improving CMR/SMR Disk Bandwidth & Latency Tiratat Patana-anake , Vincentius Martin, Nora Sandler, Cheng Wu, and Haryadi S. Gunawi 2 Manylogs @ MSST 16 Got 100% of the read bandwidth User 1 Big Read 3 Many Got 50%
Manylogs
Improving CMR/SMR Disk Bandwidth & Latency
† Tiratat Patana-anake, Vincentius Martin†, Nora Sandler, Cheng Wu, and Haryadi S. Gunawi
User 1 Big Read Got 100% of the read bandwidth
User 2 Big Read User 1 Big Read Got 50% of the read bandwidth
Fair Share
1 2 3 N
1/N bandwidth Still Fair!
Our
Manylogs @ MSST ‘16 5User 1 Big Read Oh no! 5% bandwidth?! Small Durable Writes User 2
Our m
Manylogs @ MSST ‘16 6User 1 Big Read More Bandwidth Please! Small Durable Writes User 2 Faster Latency Please!
J J
Data Journaling
Manylogs @ MSST ‘16 7Ordered Journaling
Seek Journal Big Read Small Writes J J J J J J
Data Journaling
Manylogs @ MSST ‘16 8Ordered Journaling
J J Seek Journal Big Read Small Writes J J J J J J
Data Journaling
Manylogs @ MSST ‘16 9Ordered Journaling
Problems with Current Journaling
Problems with Current Journaling
J
Ordered Journaling Data Jo
First Write Second Write
Introducing Manylogs
Manylogs @ MSST ‘16 11Single Log Manylogs
J J J J J J J J 10 MB 100 MB
J J J J Seek Journal Big Read Small Writes J J J J
Manylogs
Manylogs @ MSST ‘16 12J J J J
Small writes made durable to the nearest log without seeking
Manylogs
Manylogs @ MSST ‘16 13q Reserved log spaces uniformly across the
disk
§ 10 MB every 100 MB
q Follow the disk head (last big I/O) q Redirect Small Writes (e.g. ≤ 256 KB)
§ Nearest log: log closest to last big I/O
q Sequential Writes are left untouched
J J J J J J J 10 MB 100 MB
Manylogs
Increased Read Throughput Reduced Write Latency
Where are logs on the disk?
Manylogs @ MSST ‘16 15J J J J J J J 10 MB 100 MB
The log space = whole platter
Where are logs on the disk?
Manylogs @ MSST ‘16 16J J J J J J J 10 MB 100 MB
The log space = whole platter
Same cylinder = No seek!
J J J J J J J
Log for others in the same cylinder
Disk
User 1 128MB Sequential Reads 4KB Random Writes User 2 Latency (ms) At different intensities writes/s writes/s writes/s
Ordered vs. Data vs. Adaptive vs. Manylogs
Ratio of Max Read Bandwidth
Manylogs @ MSST ‘16 18Adaptive Journaling
Manylogs @ MSST ‘16 19q Middle ground between ordered
journaling and data journaling
q Single-log design q Prabhakaran et al., ATC ‘05
40 80 160 320 Random Writes per Second (IOPS)
Results
Manylogs @ MSST ‘16 20Ordered Adaptive Data Manylogs 0% 20% 40% 60% 80% 100% Ratio of Max Bandwidth
Results
Manylogs @ MSST ‘16 21Ordered Adaptive Data Manylogs 0% 20% 40% 60% 80% 100 Ratio of Max Bandwidth Random Writes per Second (IOPS) 40 80 160 320 57% at 40 IOPS 5% at 320 IOPS
Results
Manylogs @ MSST ‘16 22Ordered Adaptive Data Manylogs 0% 20% 40% 60% 80% 100% Ratio of Max Bandwidth Random Writes per Second (IOPS) 40 80 160 320 9% at 320 IOPS 73% at 40 IOPS
Results
Manylogs @ MSST ‘16 23Ordered Adaptive Data Manylogs 0% 20% 40% 60% 80% 100% Ratio of Max Bandwidth Random Writes per Second (IOPS) 40 80 160 320
Ordered daptive Data Manylogs 60% 80% 100%
Random Writes per Second (IOPS) 40 80 160 320
Manylogs gives the most bandwidth 50% of max bandwidth at extreme IOPS Hey! What about my latency?
Results
Manylogs @ MSST ‘16 25Ordered Adaptive Data Manylogs 100 200 300 400 500 600 Average sync Latency (ms) Random Writes per Second (IOPS) 40 80 160 320
Results
Manylogs @ MSST ‘16 26100 200 300 400 500 600 Average sync Latency (ms) Random Writes per Second (IOPS) 40 80 160 320 Ordered Adaptive Data Manylogs
Results
Manylogs @ MSST ‘16 27Random Writes per Second (IOPS) 40 80 160 320 Average sync Latency (ms) 100 200 300 400 500 600 Ordered Adaptive Data Manylogs
Results
Manylogs @ MSST ‘16 28Random Writes per Second (IOPS) 40 80 160 320 Average sync Latency (ms) 100 200 300 400 500 600 Ordered Adaptive Data Manylogs
Results
Manylogs @ MSST ‘16 29Random Writes per Second (IOPS) 40 80 160 320 Average sync Latency (ms) 100 200 300 400 500 600
WOW! Fast latency at extreme IOPS!
Ordered Adaptive Data Manylogs
Results
Manylogs @ MSST ‘16 30Ordered Adaptive Data Manylogs 0% 20% 40% 60% 80% 100% Ratio of Max Bandwidth Random Writes per Second (IOPS) 40 80 160 320 Average sync Latency (ms) 100 200 300 400 500 600
Results
Manylogs @ MSST ‘16 31User 1 128MB Sequential Reads “fileserver” User 2 Latency (ms)
Ratio of Max Read Bandwidth
Manylogs @ MSST ‘16 32Ordered Data
0% 20% 40% 60% 80% 100% Ratio of Max Bandwidth fileserver Instances 2 4 8 Operation Latency (ms) 1000 2000 4000 3000
Manylogs provides the best outcomes!
q “Lazy” or
“Off-hours”
q Rarely full
because just small writes are redirected
q Log Swapping
Manylogs
Checkpointing
Manylogs @ MSST ‘16 34q Periodically
§ Usually every 5 secs
q Journal can get
filled fast because all writes are in the journal!
Data Journaling
Hot Area! Cold Area!
Log Swapping
Manylogs @ MSST ‘16 35J J J J Seek Journal Big Read Small Writes J J J J J J J J
Integrations
Manylogs @ MSST ‘16 36q File System (MLFS)
§ Durability-Only Mode (O_DUR)
q SMR Disk (MLSMR) q RAID
Cassandra Write Path
Manylogs @ MSST ‘16 37Writes SSTable Commit Log Memtable Disk Memory
SSTable Memtable Commit Log
Cassandra Write Path
Manylogs @ MSST ‘16 38Writes Disk Memory
Disk Memory Ideally SYNC write Flush Triggered SSTable Memtable Commit Log
Cassandra Write Path
Manylogs @ MSST ‘16 39Writes SSTable Memtable Commit Log Requires Fast Durability Temp File No location needed But in practice, background write e.g. every 10 seconds Commit Log
Random writes are the problem
😗
q Need fast durability but not location
constraints
q Content of files will be put in Manylogs
regardless of the write size
q Never checkpoint their content q Random writes are not a problem
anymore!
User 1 HDFS Ratio of Max Read Bandwidth MongoDB User 2 Latency (ms)
Data Manylogs 0% 20% 40% 60% 80% Ratio of Max Bandwidth MongoDB Write Latency (ms) 50 100 150 200 250 MongoDB Instances (w/Default flush period) 1DB 2DB 4DB
Most Bandwidth & Lowest Latency with Manylogs
Manylogs & SMR
Manylogs @ MSST ‘16 43One non-shingled surface = log space
Manylogs & SMR
Manylogs @ MSST ‘16 44Shingled Band Non-Shingled Tracks
User 1 Build Server (WBS) Trace Latency (ms) Back-end Server (LM-TBE) Trace User 2 Latency (ms)
20 40 60 80 100 ML-SMR SL-SMR
Manylogs @ MSST ‘16 46Manylogs SMR (MLSMR) Single-log SMR (SLSMR) 20 40 60 80 100 Percentile Latency (ms) 10 80 30 50 40
SMR
Manylogs & RAID
Manylogs @ MSST ‘16 47 Mingzhe Hao, Gokul Soundararajan, Deepak Kenchammana-Hosekote, Andrew A. Chien, and Haryadi S.User 1 Big Read Small Durable Writes User 2
Disk #1 Disk #2 Disk #3 Disk #4
Max Bandwidth! Bandwidth drops up to 50%
User 1 128MB Sequential Reads 4KB Random Writes User 2 Latency (ms) At different intensities
writes/s
writes/s
Ratio of Max Read Bandwidth
Manylogs @ MSST ‘16 48Ordered Data Manylogs 0% 20% 40% 60% 80% Ratio of Max Bandwidth Random Writes per Second (IOPS) per Disk 40 80 160 320 Average sync Latency (ms) 100 200 300 400 500 600
10x Bandwidth Speed-up 14x Latency Speed-up at 320 IOPS!
More in the paper
Manylogs @ MSST ‘16 50q Block-Level Manylogs q Other workloads
§ Sequential Writes § “varmail”
§ More Traces
q Log Size q Logged Write Size q Mapping Table
J J J J J J J J
Manylogs
Manylogs @ MSST ‘16 51q Reserved log spaces uniformly across the
disk
q Redirect small writes to the nearest log q Can help with NoSQL, SMR, RAID, and more! q Provide up to 5x speed-up on average
Manylogs
Manylogs @ MSST ‘16 52Bandwidth Speed-up Latency Speed-up
3.7x 5.7x
2.7x 2.0x
1.3x
Thank you! Questions?
Manylogs @ MSST ‘16 53http://ucare.cs.uchicago.edu