unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
blob e9b7a411ec24d69e4705d989d42972f6555d0352 1900 bytes (raw)
name: test/benchmark/README 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
 
= Performance

Unicorn is pretty fast, and we want it to get faster.  Unicorn strives
to get HTTP requests to your application and write HTTP responses back
as quickly as possible.  Unicorn does not do any background processing
while your app runs, so your app will get all the CPU time provided to
it by your OS kernel.

A gentle reminder: Unicorn is NOT for serving clients over slow network
connections.  Use nginx (or something similar) to complement Unicorn if
you have slow clients.

== dd.ru

This is a pure I/O benchmark.  In the context of Unicorn, this is the
only one that matters.  It is a standard rackup-compatible .ru file and
may be used with other Rack-compatible servers.

  unicorn -E none dd.ru

You can change the size and number of chunks in the response with
the "bs" and "count" environment variables.   The following command
will cause dd.ru to return 4 chunks of 16384 bytes each, leading to
65536 byte response:

  bs=16384 count=4 unicorn -E none dd.ru

Or if you want to add logging (small performance impact):

  unicorn -E deployment dd.ru

Eric runs then runs clients on a LAN it in several different ways:

  client@host1 -> unicorn@host1(tcp)
  client@host2 -> unicorn@host1(tcp)
  client@host3 -> nginx@host1 -> unicorn@host1(tcp)
  client@host3 -> nginx@host1 -> unicorn@host1(unix)
  client@host3 -> nginx@host2 -> unicorn@host1(tcp)

The benchmark client is usually httperf.

Another gentle reminder: performance with slow networks/clients
is NOT our problem.  That is the job of nginx (or similar).

== ddstream.ru

Standalone Rack app intended to show how BAD we are at slow clients.
See usage in comments.

== Contributors

This directory is intended to remain stable.  Do not make changes
to benchmarking code which can change performance and invalidate
results across revisions.  Instead, write new benchmarks and update
coments/documentation as necessary.

debug log:

solving e9b7a41 ...
found e9b7a41 in https://yhbt.net/unicorn.git/

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).