othiym23/nonsense-benchmark — pull request #7 by oogali (2013-05-31 04:49:14+00:00)
Title: C + libevent2 implementation

I was running out of ephemeral ports on my Mac, and couldn't get a full run. So I tweaked the maximum segment lifetime setting (as FIN_WAIT_2 = 2*MSL) from the default of 30 seconds to 3 seconds, and was able to finish.

# install libevent2
make
sudo sysctl -w net.inet.tcp.msl=3000
./server

Also curious as to other folks statistics -- my initial runs were fast, but they seem to have settled down.

```
marvin:nsb oogali$ node node/clients/client.js
Warming up...
Warmed up with 2000 requests. Benchmarking...
Made 20000 requests in 17.00s.

Times in ms, min/mean/median/max (stddev)
Handled 20000 requests: 9.2/32.9/28.7/132.9 (15.8)
IQR filtered to 17853 requests: 16.2/28.7/28.2/42.5 (4.7)
Throughput: 70.59krpm (IQR adjusted: 133.96krpm).
^C
```

```
marvin:nsb oogali$ node node/clients/client.js
Warming up...
Warmed up with 2000 requests. Benchmarking...
Made 20000 requests in 23.91s.

Times in ms, min/mean/median/max (stddev)
Handled 20000 requests: 12.1/53.2/47.5/207.1 (22.4)
IQR filtered to 19177 requests: 12.1/50.4/46.7/99.9 (17.6)
Throughput: 50.19krpm (IQR adjusted: 76.25krpm).
^C
```

```
marvin:nsb oogali$ node node/clients/client.js
Warming up...
Warmed up with 2000 requests. Benchmarking...
Made 20000 requests in 25.30s.

Times in ms, min/mean/median/max (stddev)
Handled 20000 requests: 12.1/54.6/47.6/198.9 (25.0)
IQR filtered to 19057 requests: 12.1/50.9/46.6/104.9 (18.5)
Throughput: 47.43krpm (IQR adjusted: 75.37krpm).
^C
```

```
marvin:nsb oogali$ node node/clients/client.js
Warming up...
Warmed up with 2000 requests. Benchmarking...
Made 20000 requests in 19.94s.

Times in ms, min/mean/median/max (stddev)
Handled 20000 requests: 20.4/63.6/57.3/182.8 (23.2)
IQR filtered to 18087 requests: 20.4/57.5/55.6/99.1 (12.9)
Throughput: 60.18krpm (IQR adjusted: 66.82krpm).
```

```
marvin:nsb oogali$ node node/clients/client.js
Warming up...
Warmed up with 2000 requests. Benchmarking...
Made 20000 requests in 18.67s.

Times in ms, min/mean/median/max (stddev)
Handled 20000 requests: 10.9/59.6/49.3/281.8 (30.1)
IQR filtered to 17062 requests: 23.4/49.5/48.0/80.6 (9.2)
Throughput: 64.27krpm (IQR adjusted: 77.50krpm).
```