Profiling Network Performance in Mul5-5er Datacenter - - PowerPoint PPT Presentation

profiling network performance in mul5 5er datacenter
SMART_READER_LITE
LIVE PREVIEW

Profiling Network Performance in Mul5-5er Datacenter - - PowerPoint PPT Presentation

Profiling Network Performance in Mul5-5er Datacenter Applica5ons Minlan Yu Scalable Princeton University Net-App Profiler Joint work with Albert


slide-1
SLIDE 1

Profiling ¡Network ¡Performance ¡ in ¡Mul5-­‑5er ¡Datacenter ¡Applica5ons ¡

Minlan ¡Yu ¡ Princeton ¡University ¡

1 ¡

Joint ¡work ¡with ¡Albert ¡Greenberg, ¡Dave ¡Maltz, ¡Jennifer ¡Rexford, ¡ Lihua ¡Yuan, ¡Srikanth ¡Kandula, ¡Changhoon ¡Kim ¡ ¡ Scalable ¡ ¡ Net-­‑App ¡ ¡ Profiler ¡

slide-2
SLIDE 2

Applica5ons ¡inside ¡Data ¡Centers ¡

2 ¡

Front ¡end ¡ Server ¡ Aggregator ¡ Workers ¡

…. …. …. ….

slide-3
SLIDE 3

Challenges ¡of ¡Datacenter ¡Diagnosis ¡

  • Large ¡complex ¡applica5ons ¡

– Hundreds ¡of ¡applica5on ¡components ¡ – Tens ¡of ¡thousands ¡of ¡servers ¡

  • New ¡performance ¡problems ¡

– Update ¡code ¡to ¡add ¡features ¡or ¡fix ¡bugs ¡ – Change ¡components ¡while ¡app ¡is ¡s5ll ¡in ¡opera5on ¡

  • Old ¡performance ¡problems ¡(Human ¡factors) ¡

– Developers ¡may ¡not ¡understand ¡network ¡well ¡ ¡ – Nagle’s ¡algorithm, ¡delayed ¡ACK, ¡etc. ¡

3 ¡

slide-4
SLIDE 4

Diagnosis ¡in ¡Today’s ¡Data ¡Center ¡

4 ¡

Host ¡ App ¡ OS ¡ Packet ¡ sniffer ¡ App ¡logs: ¡ #Reqs/sec ¡ Response ¡5me ¡ 1% ¡req. ¡>200ms ¡delay ¡ Switch ¡logs: ¡ #bytes/pkts ¡per ¡minute ¡ Packet ¡trace: ¡ Filter ¡out ¡trace ¡for ¡ long ¡delay ¡req. ¡ SNAP: ¡ Diagnose ¡net-­‑app ¡interac5ons ¡ Applica5on-­‑specific ¡ Too ¡expensive ¡ Too ¡coarse-­‑grained ¡ Generic, ¡fine-­‑grained, ¡and ¡lightweight ¡

slide-5
SLIDE 5

SNAP: ¡A ¡Scalable ¡Net-­‑App ¡Profiler ¡ ¡ ¡ ¡ ¡ ¡ ¡that ¡runs ¡everywhere, ¡all ¡the ¡5me ¡

5 ¡

slide-6
SLIDE 6

SNAP ¡Architecture ¡

6 ¡

At ¡each ¡host ¡for ¡every ¡connec5on ¡ ¡ Collect ¡ data ¡

slide-7
SLIDE 7

Collect ¡Data ¡in ¡TCP ¡Stack ¡

  • TCP ¡understands ¡net-­‑app ¡interac5ons ¡

– Flow ¡control: ¡How ¡much ¡data ¡apps ¡want ¡to ¡read/write ¡ – Conges5on ¡control: ¡Network ¡delay ¡and ¡conges5on ¡

  • Collect ¡TCP-­‑level ¡sta5s5cs ¡

– Defined ¡by ¡RFC ¡4898 ¡ – Already ¡exists ¡in ¡today’s ¡Linux ¡and ¡Windows ¡OSes ¡

7 ¡

slide-8
SLIDE 8

TCP-­‑level ¡Sta5s5cs ¡

  • Cumula5ve ¡counters ¡

– Packet ¡loss: ¡#FastRetrans, ¡#Timeout ¡ – RTT ¡es5ma5on: ¡#SampleRTT, ¡#SumRTT ¡ – Receiver: ¡RwinLimitTime ¡ – Calculate ¡the ¡difference ¡between ¡two ¡polls ¡

  • Instantaneous ¡snapshots ¡

– #Bytes ¡in ¡the ¡send ¡buffer ¡ – Conges5on ¡window ¡size, ¡receiver ¡window ¡size ¡ – Representa5ve ¡snapshots ¡based ¡on ¡Poisson ¡sampling ¡

8 ¡

slide-9
SLIDE 9

SNAP ¡Architecture ¡

9 ¡

At ¡each ¡host ¡for ¡every ¡connec5on ¡ ¡ Collect ¡ data ¡ Performance ¡ Classifier ¡

slide-10
SLIDE 10

Life ¡of ¡Data ¡Transfer ¡

  • Applica5on ¡generates ¡the ¡data ¡
  • Copy ¡data ¡to ¡send ¡buffer ¡
  • TCP ¡sends ¡data ¡to ¡the ¡network ¡ ¡
  • Receiver ¡receives ¡the ¡data ¡and ¡ACK ¡

¡

10 ¡

Sender ¡ App ¡ Send ¡ Buffer ¡ Receiver ¡ Network ¡

slide-11
SLIDE 11

Taxonomy ¡of ¡Network ¡Performance ¡

– No ¡network ¡problem ¡

¡ ¡

– Send ¡buffer ¡not ¡large ¡enough ¡ – Fast ¡retransmission ¡ ¡ – Timeout ¡

¡

– Not ¡reading ¡fast ¡enough ¡(CPU, ¡disk, ¡etc.) ¡ – Not ¡ACKing ¡fast ¡enough ¡(Delayed ¡ACK) ¡

11 ¡

Sender ¡ App ¡ Send ¡ Buffer ¡ Receiver ¡ Network ¡

slide-12
SLIDE 12

Iden5fying ¡Performance ¡Problems ¡

– Not ¡any ¡other ¡problems ¡ – #bytes ¡in ¡send ¡buffer ¡

¡

– #Fast ¡retransmission ¡ – #Timeout ¡ – RwinLimitTime ¡ – Delayed ¡ACK ¡

diff(SumRTT) ¡> ¡diff(SampleRTT)*MaxQueuingDelay ¡

12 ¡

Sender ¡App ¡ Send ¡Buffer ¡ Receiver ¡ Network ¡

Direct ¡ ¡ measure ¡ Sampling ¡ Inference ¡

slide-13
SLIDE 13

Management ¡ System ¡

SNAP ¡Architecture ¡

13 ¡

At ¡each ¡host ¡for ¡every ¡connec5on ¡ ¡ Collect ¡ data ¡ Performance ¡ Classifier ¡ Cross-­‑ connec5on ¡ correla5on ¡ Topology, ¡rou5ng ¡ Conn ¡à ¡proc/app ¡ Offending ¡app, ¡ ¡ host, ¡link, ¡or ¡switch ¡

slide-14
SLIDE 14

Pinpoint ¡Problems ¡via ¡Correla5on ¡

14 ¡

  • Correla5on ¡over ¡shared ¡switch/link/host ¡

– Packet ¡loss ¡for ¡all ¡the ¡connec5ons ¡going ¡through ¡

  • ne ¡switch/host ¡

– Pinpoint ¡the ¡problema5c ¡switch ¡

¡

slide-15
SLIDE 15

Pinpoint ¡Problems ¡via ¡Correla5on ¡

15 ¡

  • Correla5on ¡over ¡applica5on ¡

– Same ¡applica5on ¡has ¡problem ¡on ¡all ¡machines ¡ – Report ¡aggregated ¡applica5on ¡behavior ¡

slide-16
SLIDE 16

Management ¡ System ¡

SNAP ¡Architecture ¡

16 ¡

At ¡each ¡host ¡for ¡every ¡connec5on ¡ ¡ Collect ¡ data ¡ Performance ¡ Classifier ¡ Cross-­‑ connec5on ¡ correla5on ¡ Topology, ¡rou5ng ¡ Conn ¡à ¡proc/app ¡ Offending ¡app, ¡ ¡ host, ¡link, ¡or ¡switch ¡ Online, ¡lightweight ¡ processing ¡& ¡diagnosis ¡ Offline, ¡cross-­‑conn ¡ diagnosis ¡

slide-17
SLIDE 17

Reducing ¡SNAP ¡Overhead ¡

  • SNAP ¡overhead ¡

– Data ¡volume: ¡120 ¡Bytes ¡per ¡connec5on ¡per ¡poll ¡ – CPU ¡overhead: ¡ ¡

  • 5% ¡for ¡polling ¡1K ¡connec5ons ¡with ¡500 ¡ms ¡interval ¡ ¡
  • Increases ¡with ¡#connec5ons ¡and ¡polling ¡freq. ¡
  • Solu5on: ¡Adap5ve ¡tuning ¡of ¡polling ¡frequency ¡

– Reduce ¡polling ¡frequency ¡to ¡stay ¡within ¡a ¡target ¡CPU ¡ – Devote ¡more ¡polling ¡to ¡more ¡problema5c ¡connec5ons ¡ ¡

17 ¡

slide-18
SLIDE 18

SNAP ¡in ¡the ¡Real ¡World ¡

¡ ¡ ¡ ¡

18 ¡

slide-19
SLIDE 19

Key ¡Diagnosis ¡Steps ¡

  • Iden5fy ¡performance ¡problems ¡

– Correlate ¡across ¡connec5ons ¡ – Iden5fy ¡applica5ons ¡with ¡severe ¡problems ¡

  • Expose ¡simple, ¡useful ¡informa5on ¡to ¡developers ¡

– Filter ¡important ¡sta5s5cs ¡and ¡classifica5on ¡results ¡

  • Iden5fy ¡root ¡cause ¡and ¡propose ¡solu5ons ¡ ¡

– Work ¡with ¡operators ¡and ¡developers ¡ – Tune ¡TCP ¡stack ¡or ¡change ¡applica5on ¡code ¡

19 ¡

slide-20
SLIDE 20

SNAP ¡Deployment ¡

  • Deployed ¡in ¡a ¡produc5on ¡data ¡center ¡

– 8K ¡machines, ¡700 ¡applica5ons ¡ – Ran ¡SNAP ¡for ¡a ¡week, ¡collected ¡terabytes ¡of ¡data ¡

  • Diagnosis ¡results ¡

– Iden5fied ¡15 ¡major ¡performance ¡problems ¡ – 21% ¡applica5ons ¡have ¡network ¡performance ¡problems ¡

20 ¡

slide-21
SLIDE 21

Characterizing ¡Perf. ¡Limita5ons ¡

21 ¡

Send ¡ Buffer ¡ Receiver ¡ Network ¡

#Apps ¡that ¡are ¡limited ¡ for ¡> ¡50% ¡of ¡the ¡5me ¡ 1 ¡App ¡ 6 ¡Apps ¡ 8 ¡Apps ¡ 144 ¡Apps ¡

– Send ¡buffer ¡not ¡large ¡enough ¡ – Fast ¡retransmission ¡ ¡ – Timeout ¡ – Not ¡reading ¡fast ¡enough ¡(CPU, ¡disk, ¡etc.) ¡ – Not ¡ACKing ¡fast ¡enough ¡(Delayed ¡ACK) ¡

slide-22
SLIDE 22

Three ¡Example ¡Problems ¡

  • Delayed ¡ACK ¡affects ¡delay ¡sensi5ve ¡apps ¡

¡

  • Conges5on ¡window ¡allows ¡sudden ¡burst ¡
  • Significant ¡5meouts ¡for ¡low-­‑rate ¡flows ¡

22 ¡

slide-23
SLIDE 23

Problem ¡1: ¡Delayed ¡ACK ¡ ¡

  • Delayed ¡ACK ¡affected ¡many ¡delay ¡sensi5ve ¡apps ¡

– even ¡#pkts ¡per ¡record ¡à ¡1,000 ¡records/sec ¡ ¡ ¡ ¡odd ¡#pkts ¡per ¡record ¡à ¡5 ¡records/sec ¡ – Delayed ¡ACK ¡was ¡used ¡to ¡reduce ¡bandwidth ¡usage ¡and ¡ server ¡interrupts ¡

23 ¡

D a t a ACK D a t a

A B

ACK

200 ms

….

Proposed ¡solu5ons: ¡ Delayed ¡ACK ¡ should ¡be ¡disabled ¡ in ¡data ¡centers ¡

ACK every

  • ther packet
slide-24
SLIDE 24

Receiver ¡ ¡ ¡ Socket ¡send ¡buffer ¡ ¡ ¡

Send ¡Buffer ¡and ¡Delayed ¡ACK ¡

Applica5on ¡buffer ¡ ¡ ¡ Applica5on ¡

  • 1. ¡Send ¡complete ¡

Network ¡ Stack ¡

  • 2. ¡ACK ¡

With ¡Socket ¡Send ¡Buffer ¡

Receiver ¡ ¡ ¡ Applica5on ¡buffer ¡ ¡ ¡ Applica5on ¡

  • 2. ¡Send ¡complete ¡

Network ¡ Stack ¡

  • 1. ¡ACK ¡

Zero-­‑copy ¡send ¡

24 ¡

  • SNAP ¡diagnosis: ¡Delayed ¡ACK ¡and ¡zero-­‑copy ¡send ¡
slide-25
SLIDE 25

Problem ¡2: ¡ ¡ Conges5on ¡Window ¡Allows ¡Sudden ¡Bursts ¡

  • Increase ¡conges5on ¡window ¡to ¡reduce ¡delay ¡

– To ¡send ¡64 ¡KB ¡data ¡with ¡1 ¡RTT ¡ ¡ – Developers ¡inten5onally ¡keep ¡conges5on ¡window ¡large ¡ – Disable ¡slow ¡start ¡restart ¡in ¡TCP ¡

25 ¡

t Window

Drops after an idle time

slide-26
SLIDE 26

Slow ¡Start ¡Restart ¡

  • SNAP ¡diagnosis ¡

– Significant ¡packet ¡loss ¡ – Conges5on ¡window ¡is ¡too ¡large ¡aler ¡an ¡idle ¡period ¡

¡

  • Proposed ¡solu5ons ¡

– Change ¡apps ¡to ¡send ¡less ¡data ¡during ¡conges5on ¡ – New ¡transport ¡protocols ¡that ¡consider ¡both ¡conges5on ¡ and ¡delay ¡

26 ¡

slide-27
SLIDE 27

Problem ¡3: ¡Timeouts ¡for ¡Low-­‑rate ¡Flows ¡

  • SNAP ¡diagnosis

¡ ¡

– More ¡fast ¡retrans. ¡for ¡high-­‑rate ¡flows ¡(1-­‑10MB/s) ¡ – More ¡5meouts ¡with ¡low-­‑rate ¡flows ¡(10-­‑100KB/s) ¡

  • Proposed ¡solu5ons ¡

– Reduce ¡5meout ¡5me ¡in ¡TCP ¡stack ¡ – New ¡ways ¡to ¡handle ¡packet ¡loss ¡for ¡small ¡flows ¡ ¡

27 ¡

slide-28
SLIDE 28

Conclusion ¡

  • A ¡simple, ¡efficient ¡way ¡to ¡profile ¡data ¡centers ¡

– Passively ¡measure ¡real-­‑5me ¡network ¡stack ¡informa5on ¡ – Systema5cally ¡iden5fy ¡problema5c ¡stages ¡ – Correlate ¡problems ¡across ¡connec5ons ¡

  • Deploying ¡SNAP ¡in ¡produc5on ¡data ¡center ¡

– Diagnose ¡net-­‑app ¡interac5ons ¡ – A ¡quick ¡way ¡to ¡iden5fy ¡them ¡when ¡problems ¡happen ¡

  • Future ¡work ¡

– Extend ¡SNAP ¡to ¡diagnose ¡wide-­‑area ¡transfers ¡

28 ¡

slide-29
SLIDE 29

Thanks! ¡

29 ¡