root/cherokee/trunk/doc/config_advanced.txt

Revision 2466, 4.9 kB (checked in by taher, 1 week ago)

--

Line 
1 == link:index.html[Index] -> link:config.html[Configuration]
2
3 Advanced Configuration
4 ----------------------
5
6 Through this section you can fine-tune several of Cherokee's
7 parameters. You should not attempt to do so unless you really know
8 what you are doing. For most cases the default parameters will work
9 just fine.
10
11 image::media/images/admin_advanced0.png[Cherokee Admin interface]
12
13 You should at least read the chapter
14 link:cookbook_optimizations.html[Optimizing Cherokee] before you
15 start tweaking things here.
16
17 [[connections]]
18 Connections
19 ~~~~~~~~~~~
20 * KeepAlive:
21   Enables the global keep-alive support for the client requests. It
22   increases the client performance by reusing a connection for more
23   than one request. It should most probably be turned on.
24
25 * Max keepalive reqs:
26   This limits the number of HTTP requests that can be served by each
27   keepalive connection. Keepalive connections improve performance, but
28   surpasing certain amount of requests per each connection is an
29   indicator that something out of the ordinary is happening. This
30   prevents the appearence of any problems related to these situations.
31
32 * Chunked encoding:
33   Enabled by default to try to keep enabled Keep-Alive.
34
35 * Polling Method: This affects the internal file descriptor polling
36   method among the ones supported by the OS. The full list of options
37   is `epoll()`, `kqueue`, `poll()`, `Solaris ports`, `select()` and
38   `Win32`. Only the alternatives available for your specific
39   architectures are shown. If you don't know what this is or how this
40   affects performance, just choose `Automatic`. This will choose the
41   most efficient one among the present at any given time.
42
43 * Sendfile min/max size:
44   These allow to configure the range of file sizes that can be sent
45   with `sendfile()`. Default: [32768 Bytes - 2 GB].
46
47 image::media/images/admin_advanced1.png[Cherokee Admin interface]
48
49 [[resources]]
50 Resources
51 ~~~~~~~~~
52 * Thread Number:
53   Adjust the number of threads for Cherokee to work with. Increasing
54   this will allow for better parallelization at the cost of system
55   resources. Highly constrained environments such as embedded devices
56   will probably be fine with just one. This doesn't translate into
57   just one connection at the time, since a thread can handle many.
58
59 * Thread Policy:
60   Defines the thread policy to be applied by the OS: FIFO, Round Robin
61   or Dynamic.
62
63 * File descriptors:
64   This can alter the number of file descriptors handled by the server
65   should handle. The default value is what `ulimit -n` reports. An
66   increase in this value improves performance under very high server load.
67
68 * Listening queue length: This specifies the size of the incoming
69   connection queue. It is the effective buffer of connections that
70   will be served even if there are no connection slots available at
71   the moment.
72
73 * Reuse connections:
74   Cherokee implements an intelligent mechanism to reuse connections if
75   possible, allowing it to improve performance by not having to
76   reinitialize structures in memory that can serve perfectly well for
77   more than one time. It defaults to 20. Though this mechanism is an obvious
78   improvent, reducing this limit is useful for cases when a sudden
79   burst of connections happens. In those cases it doesn't make much
80   sense to keep reusing many more connections than those of an average
81   load for any other moment.
82
83 * Log flush time:
84   Time interval in seconds to wait between log updates. Defaults to 10
85   seconds.
86
87 * Nonces clean up time:
88   Time interval in seconds between Nonce cache clean ups. Defaults to
89   60 seconds.
90
91 image::media/images/admin_advanced2.png[Cherokee Admin interface]
92
93 [[io_cache]]
94 I/O cache
95 ~~~~~~~~~
96 * Status:
97   Enabled by default. This is a system-wide setting required if you
98   wish to enable caching in any of your virtual hosts. Useful for debugging.
99
100 * Max pages:
101   This specifies the maximum number of pages that are handled by the cache.
102
103 * File Min Size:
104   Specifies the smallest filesize limit to be cached.
105
106 * File Max Size:
107   Specifies the biggest filesize limit to be cached.
108
109 * Lasting _stat_:
110   Specifies the duration of the file information in the cache without
111   refreshing.
112
113 * Lasting _mmap_:
114   Specifies how long the file contents last cached.
115
116 image::media/images/admin_advanced3.png[Cherokee Admin interface]
117
118 [[special_files]]
119 Special Files
120 ~~~~~~~~~~~~~
121 * Panic action:
122   This specifies the program that will be called in case the server
123   fails. It defaults to `cherokee-panic`, which is provided with
124   Cherokee. This in turn performs the actions specified in the
125   `CHEROKEE_PANIC_OUTPUT` environment variable. If none is set, it will
126   attempt to send an email to the system administrator with a
127   backtrace of what happened. As a last resort, if no mailer is
128   available in the system, it will simply try to show this information
129   on screen if possible.
130
131 * PID file:
132   If specified, a PID file will be created in that path. This is
133   useful to trace what is going on with Cherokee.
134
135 image::media/images/admin_advanced4.png[Cherokee Admin interface]
Note: See TracBrowser for help on using the browser.