benchmarking curvecp
play

Benchmarking CurveCP Thorben Kr uger benthor@os3.nl July 4, 2011 - PowerPoint PPT Presentation

Benchmarking CurveCP Thorben Kr uger benthor@os3.nl July 4, 2011 1/ 30 Outline Introduction Research Questions Methods and Results Problems Conclusion 2/ 30 CurveCP? Encrypted application-layer protocol for internet communication.


  1. Benchmarking CurveCP Thorben Kr¨ uger benthor@os3.nl July 4, 2011 1/ 30

  2. Outline Introduction Research Questions Methods and Results Problems Conclusion 2/ 30

  3. CurveCP? Encrypted application-layer protocol for internet communication. 3/ 30

  4. CurveCP in a Nutshell ◮ Brain child of Dan Bernstein (djb) ◮ To be used instead of TCP ◮ Packet-based encryption on top of UDP ◮ Treat crypto as instantaneous ◮ Advanced packet scheduler 4/ 30

  5. Claimed CurveCP Security Features ◮ mandatory server authentication ◮ optional client authentication ◮ no man-in-the-middle attacks possible ◮ active and passive forward secrecy 5/ 30

  6. Claimed CurveCP Availability Features ◮ no RST-type attacks possible ◮ protection against traffic prediction ◮ can not be used for amplification attacks ◮ no SYN-flooding-type attacks possible ◮ worst-case CPU loads kept small 6/ 30

  7. Claims about CurveCP Efficiency ◮ bigger overhead than plain TCP ◮ for short connections, less traffic than HTTPS ◮ for short connections, much less traffic than SSH 7/ 30

  8. Claimed CurveCP Decongestion Features ◮ minimizes packet-loss ◮ minimizes significant latency increases ◮ therefore mitigates buffer bloat 8/ 30

  9. Claimed CurveCP Addressing Features ◮ multiple CurveCP servers can share single IPv4 address and port ◮ CurveCP servers inherently anti-aliased from addresses ◮ rapid failover to redundant server if original is down ◮ session/connection not invalidated if IP address changes 9/ 30

  10. Major Topics for Investiagtion Create CurveCP-enabled SSH-like remote shell Create CurveCP-enablet SCP-like remote file copy tool Benchmark CurveCP vs SSH/SCP/HTTPS ◮ CPU usage ◮ available Bandwidth ◮ ideal ◮ competetive ◮ message latencies Verify CurveCP robustness claims 10/ 30

  11. Remote Shell/Copy via CurveCP Results: ◮ CurveCP-enabled remote ptty fully functional ◮ http://github.com/benthor/remotty Problems: ◮ Only Python implementation so far ◮ Useless for meaningful benchmarks ◮ No real session handling yet ◮ Doesn’t support file transfer yet 11/ 30

  12. CurveCP-enabled file transfer? For now based on cat / dd ◮ No support for arbitrary files yet 12/ 30

  13. Bonus: CurveCP enabled VPN Results: ◮ Can create tunnel devices connected via CurveCP ◮ ICMP can be successfully tunneled Problems: ◮ TCP only works for small packets so far ◮ Only Python implementation 13/ 30

  14. Benchmarking: Methods Tools: ◮ plain dd ◮ custom stream copy tool with statistics ( ddstat ) ◮ sysstat suite ◮ ethtool 14/ 30

  15. Saturating 10Mbit Link Results: ◮ CPU usage of SSH/SCP/HTTPS very similar Problems: ◮ CurveCP scheduler is too nice 15/ 30

  16. Best-case Payload Bandwidth on 10MBit Link Results: ◮ SSH/SCP/HTTPS: nearly the full 10MBit/s ◮ CurveCP: between 600KB/s and 800KB/s, average 650KB/s Problems: ◮ CurveCP scheduler is too nice 16/ 30

  17. CurveCP and TCP: Competitive Scheduling (10MBit Link) Problems: ◮ CurveCP bandwidth drops to 0 ◮ no matter who starts first ◮ no matter if LAN or Internet connection 17/ 30

  18. Trying to saturate 100Mbit Link Results: ◮ SSH/SCP/HTTPS can saturate ◮ CurveCP probably CPU bound Problems: ◮ Detailed measurements skew CPU usage 18/ 30

  19. Best-case Payload Bandwidth on 100MBit Link Results: ◮ SSH/SCP/HTTPS: nearly the full 12.5MB/s ◮ CurveCP: tops out at 4MB/s 19/ 30

  20. CurveCP and TCP: Competitive Scheduling (100MBit Link) Results: ◮ CurveCP bandwidth 1/100th of that of TCP: 120KB/s ◮ More than one connection: share up to 240KB/s 20/ 30

  21. CurveCP vs SSH: Latencies Results: ◮ (Extremeny) similar latencies to within fractions of ms Problems: ◮ Does not take SSH handshake into account 21/ 30

  22. Bonus: CurveCP and Buffer Bloat Queue delay on top of minimum path RTT - bufferbloat-curvecp1 1400 1200 Added Queue delay(ms) 1000 800 600 400 200 0 J J J J J J J J J J J J J J J J J J J u u u u u u u u u u u u u u u u u u u n n n n n n n n n n n n n n n n n n n 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 8 8 8 8 9 9 9 9 9 9 9 9 9 9 9 9 0 0 0 : : : : : : : : : : : : : : : : : : : 4 4 5 5 0 0 1 1 2 2 3 3 4 4 5 5 0 4 4 3 8 3 8 3 8 3 8 3 8 3 8 3 8 3 8 3 2 7 Time Min path Link 1 Link 2 Link 3 Link 4 Link 5 Link 6 22/ 30

  23. Questions not yet answered Will be addressed in paper: ◮ Compare SSH handshake to CurveCP ◮ CurveCP overhead in general ◮ CurveCP addressing and failure modes 23/ 30

  24. Encountered Problems 24/ 30

  25. Problem: (Reverse) HeisenBugs Packet scheduler gets confused: ◮ when UDP statistics are collected ◮ when in the presence of irregular TCP traffic Result: ◮ endless tracing/profiling/code-reviewing 25/ 30

  26. Problem: FreeBSD ◮ CurveCP pipes close prematurely ◮ file descriptor issues 26/ 30

  27. Problem: Confusing CPU statistics ◮ disagreement between tools ◮ reported percentages add up to over 100 27/ 30

  28. Conclusion ◮ Remote shell: works ◮ Remote copy: possible ◮ Performance: comparable to (but worse than) SSH/HTTPS ◮ Decongestion: works somewhat ◮ Verdict: CurveCP worthy of attention 28/ 30

  29. More Info http://curvecp.org 29/ 30

  30. Questions? 30/ 30

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