port test/unit/test_ccc.rb to Perl 5
[unicorn.git] / test / benchmark / README
blobcd929f36dce0244620a7434ea6b7b09f76d1f54e
1 = Performance
3 Unicorn is pretty fast, and we want it to get faster.  Unicorn strives
4 to get HTTP requests to your application and write HTTP responses back
5 as quickly as possible.  Unicorn does not do any background processing
6 while your app runs, so your app will get all the CPU time provided to
7 it by your OS kernel.
9 A gentle reminder: Unicorn is NOT for serving clients over slow network
10 connections.  Use nginx (or something similar) to complement Unicorn if
11 you have slow clients.
13 == dd.ru
15 This is a pure I/O benchmark.  In the context of Unicorn, this is the
16 only one that matters.  It is a standard rackup-compatible .ru file and
17 may be used with other Rack-compatible servers.
19   unicorn -E none dd.ru
21 You can change the size and number of chunks in the response with
22 the "bs" and "count" environment variables.   The following command
23 will cause dd.ru to return 4 chunks of 16384 bytes each, leading to
24 65536 byte response:
26   bs=16384 count=4 unicorn -E none dd.ru
28 Or if you want to add logging (small performance impact):
30   unicorn -E deployment dd.ru
32 Eric runs then runs clients on a LAN it in several different ways:
34   client@host1 -> unicorn@host1(tcp)
35   client@host2 -> unicorn@host1(tcp)
36   client@host3 -> nginx@host1 -> unicorn@host1(tcp)
37   client@host3 -> nginx@host1 -> unicorn@host1(unix)
38   client@host3 -> nginx@host2 -> unicorn@host1(tcp)
40 The benchmark client is usually httperf.
42 Another gentle reminder: performance with slow networks/clients
43 is NOT our problem.  That is the job of nginx (or similar).
45 == ddstream.ru
47 Standalone Rack app intended to show how BAD we are at slow clients.
48 See usage in comments.
50 == readinput.ru
52 Standalone Rack app intended to show how bad we are with slow uploaders.
53 See usage in comments.
55 == Contributors
57 This directory is intended to remain stable.  Do not make changes
58 to benchmarking code which can change performance and invalidate
59 results across revisions.  Instead, write new benchmarks and update
60 coments/documentation as necessary.