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

benchmarking curvecp
SMART_READER_LITE
LIVE PREVIEW

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.


slide-1
SLIDE 1

Benchmarking CurveCP

Thorben Kr¨ uger benthor@os3.nl July 4, 2011

1/ 30

slide-2
SLIDE 2

Outline

Introduction Research Questions Methods and Results Problems Conclusion

2/ 30

slide-3
SLIDE 3

CurveCP?

Encrypted application-layer protocol for internet communication.

3/ 30

slide-4
SLIDE 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

slide-5
SLIDE 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

slide-6
SLIDE 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

slide-7
SLIDE 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

slide-8
SLIDE 8

Claimed CurveCP Decongestion Features

◮ minimizes packet-loss ◮ minimizes significant latency increases ◮ therefore mitigates buffer bloat

8/ 30

slide-9
SLIDE 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

slide-10
SLIDE 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

slide-11
SLIDE 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

slide-12
SLIDE 12

CurveCP-enabled file transfer?

For now based on cat/dd

◮ No support for arbitrary files yet

12/ 30

slide-13
SLIDE 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

slide-14
SLIDE 14

Benchmarking: Methods

Tools:

◮ plain dd ◮ custom stream copy tool with statistics (ddstat) ◮ sysstat suite ◮ ethtool

14/ 30

slide-15
SLIDE 15

Saturating 10Mbit Link

Results:

◮ CPU usage of SSH/SCP/HTTPS very similar

Problems:

◮ CurveCP scheduler is too nice

15/ 30

slide-16
SLIDE 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

slide-17
SLIDE 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

slide-18
SLIDE 18

Trying to saturate 100Mbit Link

Results:

◮ SSH/SCP/HTTPS can saturate ◮ CurveCP probably CPU bound

Problems:

◮ Detailed measurements skew CPU usage

18/ 30

slide-19
SLIDE 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

slide-20
SLIDE 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

slide-21
SLIDE 21

CurveCP vs SSH: Latencies

Results:

◮ (Extremeny) similar latencies to within fractions of ms

Problems:

◮ Does not take SSH handshake into account

21/ 30

slide-22
SLIDE 22

Bonus: CurveCP and Buffer Bloat

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

slide-23
SLIDE 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

slide-24
SLIDE 24

Encountered Problems

24/ 30

slide-25
SLIDE 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

slide-26
SLIDE 26

Problem: FreeBSD

◮ CurveCP pipes close prematurely ◮ file descriptor issues

26/ 30

slide-27
SLIDE 27

Problem: Confusing CPU statistics

◮ disagreement between tools ◮ reported percentages add up to over 100

27/ 30

slide-28
SLIDE 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

slide-29
SLIDE 29

More Info

http://curvecp.org

29/ 30

slide-30
SLIDE 30

Questions?

30/ 30