taming latency in data center applications
play

Taming Latency In Data Center Applications Ph.D. Defense of - PowerPoint PPT Presentation

Taming Latency In Data Center Applications Ph.D. Defense of Dissertation Mohan Kumar Advisor: Taesoo Kim 1 Motivation: Importance of Latency Latency Critical In Data Center Applications 2 Data Center Applications Key-value Stores Web


  1. Dyad: Reordered Consensus Message Request PCIe 1 & 2 Ordered Log 2 1 Prepare Handler Leader SmartNIC Consensus - Data 3 2, 3 3 Network Prepareok 1 Replica 2 Majority prepareok for request 1 43

  2. Dyad: Response and Commit PCIe Response Ordered Log 2 1 Response Handler Leader SmartNIC Consensus - Data 3 3 Response Network Commit Client Replica Update log meta-data 44

  3. Dyad: Timestamp Server with 5 replicas ~2 Million messages processed on the NIC ➢ Reduce latency by up to 76% , Improves throughput by 5.8x 45

  4. Dyad – Replica Data Operations 1. Ordering 2. Replication 3. Ordered execution Client request response to host Leader prepare prepareok Replica 1 commit Replica 2 PCIe Protocol processing Context switch Application SmartNIC 46

  5. Dyad: Ordering on Replica SmartNIC ● Ordering and Logging: ➢ Logs ordered by the sequence number in prepare message ➢ Prepare message are processed and dropped on the SmartNIC ● Ordered Execution: ➢ Commit messages forwarded to the host processor ➢ The request is appended to the commit message by SmartNIC 47

  6. Dyad: Logging on Replica SmartNIC PCIe Ordered Log 2 1 Prepare Handler Replica SmartNIC Consensus - Data Network Prepareok 2 Prepare 2 Leader Leader Log request using sequence number 48

  7. Dyad: Ordered Execution on the Replica Commit 1 PCIe Ordered Log 2 1 Commit Handler Replica SmartNIC Consensus - Data Network Commit 1 Leader Verify order of received commit 49

  8. Dyad: Timestamp Server with 5 replicas ➢ Reduce latency by 30 μs 50

  9. Dyad: Consensus Latency System Consensus % reduction latency (μs) VR 350 N/A VR-batching 409 N/A Dyad-Leader 48 86% Dyad-All 17 95% Timestamp server - 5 replicas 51

  10. Dyad: CPU Usage Timestamp Server ➢ Reduce CPU usage by up to 70% on the leader 52

  11. Dyad: Control Operations Application Consensus - Control Host BSD socket Linux epoll Replica Protocol Processing PCIe Consensus – Data SmartNIC Network 53

  12. Dyad: Application Failures Application 92% catastrophic failure - due to Consensus - Control software [1] Host BSD socket Linux epoll Replica Protocol Processing PCIe Fail-stop failure Consensus – Data SmartNIC Network [1] Simple Testing Can Prevent Most Critical Failures, OSDI’14 54

  13. Dyad: Detecting Application Failures Application Consensus - Control Host BSD socket Linux epoll Replica Protocol Processing Request Response Host RTT Consensus – Data SmartNIC Network 55

  14. Dyad: Detecting Application Failures ● Measure host RTT for each request ● Computed weighted average of host RTTs ● Detect failure - response not within host RTT threshold 56

  15. Application Recovery - VR Replica 1 - Leader Replica 2 Replica 3 Application Restart Application Application Application Consensus Consensus Consensus BSD socket Linux epoll BSD socket Linux epoll BSD socket Linux epoll Log Transfer Protocol Processing Protocol Processing Protocol Processing PCIe PCIe PCIe NIC NIC NIC Client Requests Data Center Network (μs RTT) 57

  16. Dyad: Application Recovery ● Recovery using logs on SmartNIC ● Two stage recovery: ➢ Recover logs from the SmartNIC ➢ Recover remaining logs from other replicas 58

  17. Dyad: Application Recovery 400MB of data received ➢ Dyad reduces recovery time by up to 67% 59

  18. Dyad: SmartNIC Failure Application Consensus - Control Host BSD socket Linux epoll Replica Protocol Processing PCIe Consensus – Data SmartNIC Network 60

  19. Dyad: System Failure Application 8% - hardware faults, misconfigs [1] Consensus - Control Host BSD socket Linux epoll Replica Protocol Processing PCIe Consensus – Data SmartNIC Network [1] Simple Testing Can Prevent Most Critical Failures, OSDI’14 61

  20. Dyad: System Recovery ● SmartNIC Failure: ➢ Detected on the host using heartbeat/client messages ➢ Existing VR recovery: fetch remaining logs from other replicas ● System Failure: ➢ Existing VR recovery: fetch logs from other replicas ➢ Dyad supports logging to disk from host (Raft) 62

  21. Dyad: Reliable Connection ● Dyad Supports Raft: ➢ Using TCP connection to replicas ➢ TCP stack specifically decode Raft headers and payload ➢ Host application logs client commands to disk for persistence 63

  22. Dyad: Raft Latency ➢ Improves latency by up to 62% 64

  23. Dyad: Ease of Use ● Memcached: ➢ Enable consensus for Memcached ■ ~100 lines of code for data operations on replica ➢ Evaluate impact on latency and throughput 65

  24. Dyad: Memcached Throughput ➢ Provides consensus with ~7% reduction in throughput 66

  25. Dyad: Memcached Latency ➢ Provides consensus with ~16% increase in latency 67

  26. Dyad: Untangling Logically-Coupled Consensus ● Motivation ● Background ● Overview ● Design and Evaluation ● Conclusion 68

  27. Dyad: Conclusion ● SmartNIC abstraction for consensus ● Data operations performed on the SmartNIC ● Control operations performed on the Host ● Enables consensus as a service on SmartNICs 69

  28. Thesis: Conclusion ● Xps - Extensible Protocol Stack: ➢ Abstraction in kernel, user space, and SmartNIC ● Latr - lazy TLB shootdown: ➢ Kernel mechanism for TLB shootdown System abstractions and optimizations are needed at different levels of the software stack to reduce the latency and improve the throughput of current data-center applications. 70

  29. Thank you! 71

  30. Backup Slides 72

  31. Arrakis 73

  32. Redis comparison with Arrakis 74

  33. Latr - Apache 75

  34. Latr - Apache latency 76

  35. User-Space Stacks 77

  36. User Space: Protocol processing Systems Latency (μs) Mitigation mTCP ~ 23 Batching IX ~12 Batching Arrakis ~2.6 - 6.3 None 78

  37. VR: IX batching with 3 Replicas 79

  38. Context Switch 80

  39. VR - Leader Context Switch 81

  40. Dyad - Parallelism 82

  41. Dyad: Application Parallelism ● Without SmartNIC: ➢ Sequence numbers are available in prepareok message ➢ Multi-thread execution by using the sequence number ● Dyad: ➢ Request are ordered without containing the sequence number ➢ SmartNIC appends the sequence number to the client request 83

  42. Dyad: Parallelism Timestamp Server ➢ Improves throughput by up to 2.1x 84

  43. Reading Logs 85

  44. Dyad: Log Read Throughput ➢ Log read throughput ~256 MB with 16 threads 86

  45. Direct Cost Formula 87

  46. Cost of Consensus - Direct and Indirect Consensus overhead increases with increasing replicas 88

  47. VR Recovery Data Transfer 89

  48. Application Recovery - VR data transfer Replicas Log Size Data transferred (MB) (MB) 3 100 200 5 100 400 7 100 600 90

  49. False Positives RTT 91

  50. Dyad: False Positives with Timestamp Server ➢ RTT = ~96 μs 92

  51. SmartNIC - Netronome 93

  52. SmartNIC: Memory Hierarchy and Latency 94

  53. Recovery Example 95

  54. Dyad - Recovery Phase1 Replica 1 - Leader Replica 2 Replica 3 Application Restart Application Application Application Consensus Consensus Consensus BSD socket Linux epoll BSD socket Linux epoll BSD socket Linux epoll Protocol Processing Protocol Processing Protocol Processing 1, 2 PCIe PCIe PCIe SmartNIC SmartNIC SmartNIC 3 2 1 2 1 3 2 1 Client Requests Data Center Network (μs RTT) 96

  55. Dyad - Recovery Phase2 Replica 1 - Leader Replica 2 Replica 3 Application Restart Application Application Application Consensus Consensus Consensus BSD socket Linux epoll BSD socket Linux epoll BSD socket Linux epoll Log Transfer Log Transfer Protocol Processing Protocol Processing Protocol Processing 3 3 PCIe PCIe PCIe NIC NIC NIC 3 2 1 3 2 1 3 2 1 Client Requests Data Center Network (μs RTT) 97

  56. Raft - Logging to Disk 98

  57. Dyad: Raft Latency with disk logging ➢ Improves latency by up to 46% 99

  58. Dyad - Future Work 100

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend