Improving the Performance of IPOP Research Project 2 - - PowerPoint PPT Presentation

improving the performance of ipop research project 2
SMART_READER_LITE
LIVE PREVIEW

Improving the Performance of IPOP Research Project 2 - - PowerPoint PPT Presentation

University of Amsterdam System and Network Engineering Improving the Performance of IPOP Research Project 2 Supervisors: Ana Oprescu Dragos Lauren,u Barosan


slide-1
SLIDE 1

Improving the Performance of IPOP
 Research Project 2

¡ ¡ ¡ ¡ ¡ ¡

Dragos ¡Lauren,u ¡Barosan ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ dragos.barosan@os3.nl

University of Amsterdam System and Network Engineering Supervisors: ¡ ¡ Ana ¡Oprescu ¡ Kaveh ¡Razavi ¡ Kyuho ¡Jeong ¡ Renato ¡Figueiredo ¡ ¡

slide-2
SLIDE 2

IPOP ¡

  • IP ¡over ¡P2P ¡
  • Creates ¡links ¡between ¡users ¡leveraging ¡
  • nline ¡social ¡connec6ons ¡
  • Can ¡bypass ¡NAT ¡
  • Secure ¡links ¡
  • It ¡supports ¡exis6ng ¡applica6ons ¡
  • Libjingle ¡is ¡used ¡for ¡packet ¡forwarding ¡

Figueiredo, ¡R. ¡(2014) ¡IP ¡over ¡P2P ¡White ¡Paper ¡ ¡

slide-3
SLIDE 3

Mo(va(on

¡

  • IPOP ¡allows ¡users ¡to ¡establish ¡

connec6ons ¡in ¡cloud ¡ infrastructures ¡

  • Performance ¡is ¡bad ¡
  • 260 ¡Mbps ¡average ¡throughput ¡with ¡

IPOP ¡

  • 950 ¡Mbps ¡average ¡over ¡direct ¡link ¡
  • Performance ¡improvement ¡could ¡

enable ¡larger ¡adop6on ¡

slide-4
SLIDE 4

Research ¡Ques(ons

  • What ¡are ¡the ¡sources ¡of ¡the ¡performance ¡overhead? ¡
  • What ¡are ¡the ¡solu6ons? ¡
slide-5
SLIDE 5

Star(ng ¡Ideas

¡

  • IPOP ¡assumes ¡that ¡connec6ons ¡are ¡always ¡over ¡insecure ¡networks ¡
  • IPOP ¡was ¡not ¡developed ¡with ¡performance ¡in ¡mind ¡
  • Possible ¡inefficiencies ¡in ¡the ¡code ¡
slide-6
SLIDE 6

Security ¡Performance

  • Uses ¡DTLS ¡as ¡security ¡
  • Measurements ¡show ¡increase ¡of ¡~100% ¡when ¡security ¡is ¡disabled ¡
  • 550 ¡Mbps ¡average ¡throughput ¡for ¡an ¡unsecured ¡connec6on ¡
  • 260 ¡Mbps ¡average ¡throughput ¡for ¡DTLS ¡connec6on ¡
  • Cloud ¡Infrastructure ¡use ¡case ¡requires ¡security ¡for ¡a ¡small ¡number ¡of ¡

peers ¡

  • Security ¡cannot ¡be ¡enabled ¡selec6vely ¡for ¡each ¡peer ¡
  • A ¡more ¡granular ¡approach ¡is ¡beZer ¡

¡

slide-7
SLIDE 7

Enabling ¡Selec(ve ¡Security ¡1

¡

  • Easy ¡solu6on ¡
  • Each ¡IPOP ¡node ¡has ¡an ¡IPOP ¡interface ¡with ¡an ¡associated ¡IP ¡
  • In ¡the ¡local ¡controller ¡configura6on ¡file ¡add ¡the ¡IP’s ¡associated ¡with ¡the ¡peers ¡

with ¡which ¡security ¡should ¡be ¡enabled ¡

  • The ¡list ¡of ¡IP’s ¡is ¡checked ¡when ¡crea6ng ¡the ¡link ¡
  • Does ¡not ¡scale ¡
  • It ¡is ¡possible ¡that ¡the ¡IP ¡is ¡not ¡known ¡
slide-8
SLIDE 8

Enabling ¡Selec(ve ¡Security ¡2

  • Define ¡a ¡set ¡of ¡groups ¡in ¡the ¡controller ¡configura6on ¡file

¡ ¡

  • Security ¡is ¡enabled ¡if ¡the ¡intersec6on ¡of ¡the ¡sets ¡is ¡not ¡empty ¡ ¡
  • Encode ¡group ¡informa6on ¡in ¡“con_req” ¡and ¡“con_resp” ¡messages ¡
slide-9
SLIDE 9

Improving ¡Code ¡Performance

IPOP-­‑TInCan ¡ Controller ¡ IPOP-­‑Tap ¡ PNIC ¡(eth) ¡ VNIC ¡(tap) ¡ Send ¡ Recv ¡ Packet ¡ Handling ¡ Thread ¡ Link ¡ Setup ¡ Thread ¡ Tap ¡ API ¡ Socket ¡ API ¡ VPN ¡controller ¡ TinCan ¡API ¡ JSON/UDP ¡ Applica6on ¡ Socket ¡ API ¡

Figueiredo, ¡R. ¡(2014) ¡IP ¡over ¡P2P ¡White ¡Paper ¡

slide-10
SLIDE 10

Measurements ¡ ¡

  • Analyze ¡where ¡6me ¡is ¡spent ¡by ¡the ¡processor ¡
  • All ¡debugging ¡symbols ¡were ¡enabled ¡
  • Oprofile ¡ ¡
  • Kernel ¡and ¡libc ¡symbols ¡
  • Source ¡code ¡annotated ¡with ¡usage ¡percentage ¡
  • Zoom ¡
  • Presents ¡a ¡top ¡down ¡callgraph ¡

¡

  • CPU ¡load ¡measurements ¡
  • Timing ¡measurements ¡in ¡the ¡code ¡

¡ ¡

slide-11
SLIDE 11

Receiver ¡boCleneck

¡ ¡

  • Oprofile ¡
  • ~33 ¡million ¡samples ¡in ¡the ¡receiver ¡
  • ~16 ¡million ¡samples ¡in ¡the ¡sender ¡ ¡

¡

  • Core ¡on ¡which ¡the ¡receiving ¡thread ¡executes ¡is ¡at ¡~100% ¡on ¡the ¡

receiver ¡side ¡

slide-12
SLIDE 12

Receiving ¡Packets ¡in ¡IPOP

  • Receiving ¡Thread ¡introduces ¡serializa6on ¡
  • Wri6ng ¡to ¡the ¡tap ¡interface ¡is ¡synchronous ¡
slide-13
SLIDE 13

Solu(ons

  • Implement ¡the ¡Producer-­‑Consumer ¡paZern ¡
  • Reading ¡is ¡faster ¡that ¡wri6ng ¡=> ¡The ¡wri6ng ¡thread ¡does ¡not ¡wait ¡
  • First ¡implementa6on ¡with ¡no ¡mutex ¡
  • Use ¡condi6onal ¡signals ¡as ¡a ¡refinement ¡

¡

  • Implement ¡asynchronous ¡writes ¡to ¡save ¡6me ¡ ¡
  • Linux ¡offers ¡two ¡possibili6es ¡
  • POSIX ¡AIO ¡– ¡creates ¡mul6ple ¡wri6ng ¡threads ¡
  • Libaio ¡– ¡actually ¡queues ¡up ¡write ¡requests ¡in ¡the ¡kernel ¡
slide-14
SLIDE 14

Current ¡status ¡& ¡Conclusion

¡

Improve ¡performance ¡up ¡by ¡a ¡factor ¡of ¡two ¡and ¡more ¡to ¡come… ¡ ¡

  • Users ¡have ¡the ¡possibility ¡of ¡a ¡granular ¡security ¡op6on ¡
  • Analysis ¡shows ¡where ¡6me ¡is ¡consumed ¡
  • Implementa6on ¡of ¡more ¡efficient ¡packet ¡processing ¡
slide-15
SLIDE 15

Future ¡Work

  • Find ¡and ¡fix ¡possible ¡bugs ¡
  • Inves6gate ¡other ¡performance ¡boZlenecks ¡
  • Discover ¡new ¡use ¡cases ¡for ¡IPOP ¡

¡