A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Settings | Service | config option | avg resp. time (ms) | avg reqs/sec | avg reqs/min | avg DB trans/sec | |||||||||||||
2 | connection buffer (%) | 50% | Gunicorn | workers | 32 | 150 | 853 | 51,200 | 4,267 | |||||||||||
3 | ulimit buffer | 500 | Gunicorn | worker_connections | 1 | 200 | 640 | 38,400 | 3,200 | |||||||||||
4 | # web servers | 10 | postgres | target active connections | 60 | 250 | 512 | 30,720 | 2,560 | |||||||||||
5 | # db servers | 2 | pgbouncer | max_client_conn (min) | 96 | 300 | 427 | 25,600 | 2,133 | |||||||||||
6 | avg DB transactions/page | 5 | pgbouncer | default_pool_size | 6 | 400 | 320 | 19,200 | 1,600 | |||||||||||
7 | redis conns per page view | 1 | postgres | actual active connections (max) | 60 | 800 | 160 | 9,600 | 800 | |||||||||||
8 | requests/second coeffecient | 0.4 | postgres | max_connections (min) | 100 | 1,600 | 80 | 4,800 | 400 | |||||||||||
9 | redis | maxclients (min) | 480 | 3,200 | 40 | 2,400 | 200 | |||||||||||||
10 | redis | ulimit (min) | 1000 | 6,400 | 20 | 1,200 | 100 | |||||||||||||
11 | rabbitmq | ulimit (min) | 1000 | |||||||||||||||||
12 | memcache | connections (min) | 480 | |||||||||||||||||
13 | memcache | ulimit (min) | 1000 | |||||||||||||||||
14 | Notes: | |||||||||||||||||||
15 | Bolded items can be modified | |||||||||||||||||||
16 | Connection buffer is % of additional pgbouncer & postgres connections to reserve, on top of what's needed | |||||||||||||||||||
17 | Postgres max_connections should be determined based on machine resources; see http://wiki.postgresql.org/wiki/Number_Of_Database_Connections, http://thebuild.com/presentations/not-my-job-djangocon-us.pdf | |||||||||||||||||||
18 | The requests/second coefficient represents "efficiency" of the web servers and is adjusted based on the avg reqs/sec seen for a response time of around 200ms, in the real world | |||||||||||||||||||
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 | ||||||||||||||||||||
56 | ||||||||||||||||||||
57 | ||||||||||||||||||||
58 | ||||||||||||||||||||
59 | ||||||||||||||||||||
60 | ||||||||||||||||||||
61 | ||||||||||||||||||||
62 | ||||||||||||||||||||
63 | ||||||||||||||||||||
64 | ||||||||||||||||||||
65 | ||||||||||||||||||||
66 | ||||||||||||||||||||
67 | ||||||||||||||||||||
68 | ||||||||||||||||||||
69 | ||||||||||||||||||||
70 | ||||||||||||||||||||
71 | ||||||||||||||||||||
72 | ||||||||||||||||||||
73 | ||||||||||||||||||||
74 | ||||||||||||||||||||
75 | ||||||||||||||||||||
76 | ||||||||||||||||||||
77 | ||||||||||||||||||||
78 | ||||||||||||||||||||
79 | ||||||||||||||||||||
80 | ||||||||||||||||||||
81 | ||||||||||||||||||||
82 | ||||||||||||||||||||
83 | ||||||||||||||||||||
84 | ||||||||||||||||||||
85 | ||||||||||||||||||||
86 | ||||||||||||||||||||
87 | ||||||||||||||||||||
88 | ||||||||||||||||||||
89 | ||||||||||||||||||||
90 | ||||||||||||||||||||
91 | ||||||||||||||||||||
92 | ||||||||||||||||||||
93 | ||||||||||||||||||||
94 | ||||||||||||||||||||
95 | ||||||||||||||||||||
96 | ||||||||||||||||||||
97 | ||||||||||||||||||||
98 | ||||||||||||||||||||
99 | ||||||||||||||||||||
100 |