Skip to content

Commit 4884e9b

Browse files
committedMar 16, 2015
Update README
1 parent acab904 commit 4884e9b

File tree

1 file changed

+36
-54
lines changed

1 file changed

+36
-54
lines changed
 

‎README.md

+36-54
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,53 @@
11
Introduction
22
================
33

4-
I wrote that code because: (the obvious reason::I love to write code in Go)
4+
Benchmark tool for HTTP/SPDY over QUIC protocol written in Go. Originally forked from cmpxchg16's [Gobench](https://github.com/cmpxchg16/gobench).
55

6-
We are working so hard to optimize our servers - why shouldn't we do it for our clients testers?!
76

8-
I noticed that the existing tools for benchmarking/load HTTP/HTTPS servers has some issues:
9-
* ab (ApacheBenchmark) - maximum concurrency is 20k (can be eliminate by opening multiple ab processes)
10-
* Siege are work in a model of native thread per request, meaning that you cannot simulated thousands/ten of thousands clients concurrently even if you tweak the RLIMIT of stack usage per native thread - still that kill the client machine and cause it to be very load and not an efficient client/s.
11-
What we really want is minimum resources usage and get the maximum throughput/load!
7+
Getting Started
8+
================
129

13-
If you already familiar with the model of Go for high performance I/O and goroutines we can achieve that mission easily.
10+
## Dependency
1411

15-
The funny part - I do some benchmark to the client tester tool and not to the server:
12+
* [goquic](https://github.com/devsisters/goquic)
13+
* [gospdyquic](https://github.com/devsisters/gospdyquic)
1614

17-
##Siege vs GoBench:
15+
## Build static library files
1816

19-
###Siege:
17+
To build quicbench, you should build goquic's [static library files](https://github.com/devsisters/gospdyquic#build-static-library-files).
2018

21-
$>siege -b -t10S -c500 http://localhost:80/
22-
23-
** SIEGE 2.70
24-
** Preparing 500 concurrent users for battle.
25-
The server is now under siege...
26-
Lifting the server siege... done.
27-
Transactions: 74247 hits
28-
Availability: 100.00 %
29-
Elapsed time: 9.62 secs
30-
Data transferred: 96.58 MB
31-
Response time: 0.06 secs
32-
Transaction rate: 7717.98 trans/sec
33-
Throughput: 10.04 MB/sec
34-
Concurrency: 490.19
35-
Successful transactions: 74247
36-
Failed transactions: 0
37-
Longest transaction: 1.02
38-
Shortest transaction: 0.00
39-
40-
###GoBench:
19+
## How to build
4120

42-
$>go run gobench.go -k=true -u http://localhost:80 -c 500 -t 10
43-
Dispatching 500 clients
44-
Waiting for results...
21+
Due to Go 1.4's cgo restrictions, use an environment variable like below to
22+
build your projects. This restriction will be removed from Go 1.5.
4523

46-
Requests: 343669 hits
47-
Successful requests: 343669 hits
48-
Network failed: 0 hits
49-
Bad requests failed (!2xx): 0 hits
50-
Successfull requests rate: 34366 hits/sec
51-
Read throughput: 54700061 bytes/sec
52-
Write throughput: 4128684 bytes/sec
53-
Test time: 10 sec
24+
```bash
25+
CGO_LDFLAGS="-L$GOPATH/src/github.com/devsisters/goquic/lib/$GOOS_$GOARCH"
26+
```
5427

28+
For example, building quicbench in Mac:
5529

56-
* requests hits and requests rate are 5X better on the same time (10 seconds) and the same number of clients (500)!
57-
* I try the same with 2000 clients on Siege with proper system configuration, and Siege was crashed
58-
* I try gobench with the maximum number of clients that we can use (65535 ports) - it's rocked!
59-
* I didn't put yet the results of ab because I still need to investigate the results
30+
```bash
31+
CGO_LDFLAGS="-L$GOPATH/src/github.com/devsisters/goquic/lib/darwin_amd64" go build $GOPATH/github.com/devsisters/quicbench/quicbench.go
32+
```
6033

61-
Usage
62-
================
34+
In Linux:
6335

64-
1. run some http server on port 80
65-
2. run gobench for HTTP GET
36+
```bash
37+
CGO_LDFLAGS="-L$GOPATH/src/github.com/devsisters/goquic/lib/linux_amd64" go build $GOPATH/github.com/devsisters/quicbench/quicbench.go
38+
```
6639

67-
```$>go run gobench.go -u http://localhost:80 -k=true -c 500 -t 10```
68-
69-
3. run gobench for HTTP POST
40+
## Usage
41+
42+
1. run some quic supported server. You may use server implementation bundled in [gospdyquic](https://github.com/devsisters/gospdyquic)
43+
or toy server implementation in Chromium [here](http://www.chromium.org/quic/playing-with-quic)
44+
2. run quicbench for HTTP GET
45+
46+
```$>go run quicbench.go -u http://localhost:80 -k=true -c 50 -r=10 -t 10```
47+
48+
3. run quicbench for HTTP POST
7049

71-
```$>go run gobench.go -u http://localhost:80 -k=true -c 500 -t 10 -d /tmp/post```
50+
```$>go run quicbench.go -u http://localhost:80 -k=true -c 50 -r=10 -t 10 -d /tmp/post```
7251

7352

7453
Notes
@@ -80,6 +59,8 @@ Notes
8059

8160
2. Because it's a test tool, in HTTPS the ceritificate verification is insecure
8261
3. use Go >= 1.1 (1.1 including major bug fixes)
62+
4. quicbench creates one QUIC connection for each client and just create new stream for every request.
63+
If you want to create QUIC connection for every request, use -qk=false option.
8364

8465
Help
8566
================
@@ -94,4 +75,5 @@ Licensed under the New BSD License.
9475
Author
9576
================
9677

97-
Uri Shamay (shamayuri@gmail.com)
78+
Originally written by Uri Shamay (shamayuri@gmail.com)
79+
QUIC protocol adopted by Brian Sung-Jin Hong (sungjinhong@devsisters.com) and Joonsung Lee (joonsung@devsisters.com)

0 commit comments

Comments
 (0)
Please sign in to comment.