Skip to content

Instantly share code, notes, and snippets.

@rrnewton
Created February 24, 2012 15:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rrnewton/1901698 to your computer and use it in GitHub Desktop.
Save rrnewton/1901698 to your computer and use it in GitHub Desktop.
Current performance (latency) of different network-transport backends
This is the average latency as measured by a single trial run of 100K ping/pongs with several different transports.
PingTCP: 7.34s >80%CPU
PingTCPTransport: 19s ~60%CPU
PingPipes: 6.36s >=100%CPU
The machine is a 3.1 ghz Intel Westmere (Dell workstation) running RHEL 6.2.
The PingTCP is a baseline that uses the raw Network.Socket interface rather than the Network.Transport abstraction.
@acfoltzer
Copy link

I just ran on granite.cs.indiana.edu with the following (discouraging) results:

afoltzer@granite ~/src/distributed-process [master*]$ ./benchmarks/PingTCP client granite.cs.indiana.edu 8190 100000
server: listening for pings
warming up
estimating clock resolution...
mean is 1.579211 us (320001 iterations)
found 2315 outliers among 319999 samples (0.7%)
  2202 (0.7%) high severe
estimating cost of a clock call...
mean is 45.47631 ns (11 iterations)
found 2 outliers among 11 samples (18.2%)
  1 (9.1%) high mild
  1 (9.1%) high severe

benchmarking PingTCP
collecting 100 samples, 1 iterations each, in estimated 349.7981 s
mean: 3.355803 s, lb 3.274801 s, ub 3.419473 s, ci 0.950
std dev: 367.1117 ms, lb 298.1148 ms, ub 450.5691 ms, ci 0.950
found 9 outliers among 100 samples (9.0%)
  5 (5.0%) low severe
  4 (4.0%) low mild
variance introduced by outliers: 82.101%
variance is severely inflated by outliers

afoltzer@granite ~/src/distributed-process [master*]$ ./benchmarks/PingTransport client granite.cs.indiana.edu 8191 sourceAddr 100000
warming up
server: awaiting pings
estimating clock resolution...
mean is 1.396276 us (640001 iterations)
found 3593 outliers among 639999 samples (0.6%)
  3548 (0.6%) high severe
estimating cost of a clock call...
mean is 43.10540 ns (11 iterations)

benchmarking PingTransport
collecting 100 samples, 1 iterations each, in estimated 826.5324 s
mean: 8.009859 s, lb 7.816015 s, ub 8.107999 s, ci 0.950
std dev: 681.3909 ms, lb 398.1707 ms, ub 1.071390 s, ci 0.950
found 13 outliers among 100 samples (13.0%)
  10 (10.0%) low severe
  3 (3.0%) high severe
variance introduced by outliers: 73.785%
variance is severely inflated by outliers

@rrnewton
Copy link
Author

Well those results are quite a bit better than mine (from a seemingly identical machine!).

You got 3.35s instead of 7.3 (TCP)
And 8.0s instead of 19 (Network.Transport.TCP)

What gives? I'll check if it's the problem you mentioned with certain port ranges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment