doxygen use sections
[platform/upstream/libwebsockets.git] / doc / latex / md_README.build.tex
1 \hypertarget{md_README.build_cm}{}\section{Introduction to C\+Make}\label{md_README.build_cm}
2 C\+Make is a multi-\/platform build tool that can generate build files for many different target platforms. See more info at \href{http://www.cmake.org}{\tt http\+://www.\+cmake.\+org}
3
4 C\+Make also allows/recommends you to do \char`\"{}out of source\char`\"{}-\/builds, that is, the build files are separated from your sources, so there is no need to create elaborate clean scripts to get a clean source tree, instead you simply remove your build directory.
5
6 Libwebsockets has been tested to build successfully on the following platforms with S\+SL support (both Open\+S\+S\+L/wolf\+S\+SL)\+:
7
8
9 \begin{DoxyItemize}
10 \item Windows (Visual Studio)
11 \item Windows (Min\+GW)
12 \item Linux (x86 and A\+RM)
13 \item O\+SX
14 \item Net\+B\+SD
15 \end{DoxyItemize}\hypertarget{md_README.build_build1}{}\section{Building the library and test apps}\label{md_README.build_build1}
16 The project settings used by C\+Make to generate the platform specific build files is called \href{CMakeLists.txt}{\tt C\+Make\+Lists.\+txt}. C\+Make then uses one of its \char`\"{}\+Generators\char`\"{} to output a Visual Studio project or Make file for instance. To see a list of the available generators for your platform, simply run the \char`\"{}cmake\char`\"{} command.
17
18 Note that by default Open\+S\+SL will be linked, if you don\textquotesingle{}t want S\+SL support see below on how to toggle compile options.\hypertarget{md_README.build_bu}{}\section{Building on Unix\+:}\label{md_README.build_bu}
19
20 \begin{DoxyEnumerate}
21 \item Install C\+Make 2.\+8 or greater\+: \href{http://cmake.org/cmake/resources/software.html}{\tt http\+://cmake.\+org/cmake/resources/software.\+html} (Most Unix distributions comes with a packaged version also)
22 \item Install Open\+S\+SL.
23 \item Generate the build files (default is Make files)\+: 
24 \begin{DoxyCode}
25 1 $ cd /path/to/src
26 2 $ mkdir build
27 3 $ cd build
28 4 $ cmake ..
29 \end{DoxyCode}
30
31 \item Finally you can build using the generated Makefile\+: 
32 \begin{DoxyCode}
33 1 $ make && sudo make install
34 \end{DoxyCode}
35  {\bfseries N\+O\+TE}\+: The {\ttfamily build/}{\ttfamily directory can have any name and be located anywhere on your filesystem, and that the argument}..` given to cmake is simply the source directory of {\bfseries libwebsockets} containing the \href{CMakeLists.txt}{\tt C\+Make\+Lists.\+txt} project file. All examples in this file assumes you use \char`\"{}..\char`\"{}
36 \end{DoxyEnumerate}
37
38 {\bfseries N\+O\+T\+E2}\+: A common option you may want to give is to set the install path, same as --prefix= with autotools. It defaults to /usr/local. You can do this by, eg 
39 \begin{DoxyCode}
40 1 $ cmake -DCMAKE\_INSTALL\_PREFIX:PATH=/usr .
41 \end{DoxyCode}
42
43
44 {\bfseries N\+O\+T\+E3}\+: On machines that want libraries in lib64, you can also add the following to the cmake line 
45 \begin{DoxyCode}
46 1 -DLIB\_SUFFIX=64
47 \end{DoxyCode}
48
49
50 {\bfseries N\+O\+T\+E4}\+: If you are building against a non-\/distro Open\+S\+SL (eg, in order to get access to A\+L\+PN support only in newer Open\+S\+SL versions) the nice way to express that in one cmake command is eg, 
51 \begin{DoxyCode}
52 1 $ cmake .. -DOPENSSL\_ROOT\_DIR=/usr/local/ssl \(\backslash\)
53 2          -DCMAKE\_INCLUDE\_DIRECTORIES\_PROJECT\_BEFORE=/usr/local/ssl \(\backslash\)
54 3          -DLWS\_WITH\_HTTP2=1
55 \end{DoxyCode}
56
57
58 When you run the test apps using non-\/distro S\+SL, you have to force them to use your libs, not the distro ones 
59 \begin{DoxyCode}
60 1 $ LD\_LIBRARY\_PATH=/usr/local/ssl/lib libwebsockets-test-server --ssl
61 \end{DoxyCode}
62
63
64 To get it to build on latest openssl (2016-\/04-\/10) it needed this approach 
65 \begin{DoxyCode}
66 1 cmake .. -DLWS\_WITH\_HTTP2=1 -DLWS\_OPENSSL\_INCLUDE\_DIRS=/usr/local/include/openssl
67        -DLWS\_OPENSSL\_LIBRARIES="/usr/local/lib64/libssl.so;/usr/local/lib64/libcrypto.so"
68 \end{DoxyCode}
69
70
71 {\bfseries N\+O\+T\+E5}\+: To build with debug info and \+\_\+\+D\+E\+B\+UG for lower priority debug messages compiled in, use 
72 \begin{DoxyCode}
73 1 $ cmake .. -DCMAKE\_BUILD\_TYPE=DEBUG
74 \end{DoxyCode}
75 \hypertarget{md_README.build_cmq}{}\section{Quirk of cmake}\label{md_README.build_cmq}
76 When changing cmake options, for some reason the only way to get it to see the changes sometimes is delete the contents of your build directory and do the cmake from scratch.\hypertarget{md_README.build_cmw}{}\section{Building on Windows (\+Visual Studio)}\label{md_README.build_cmw}
77
78 \begin{DoxyEnumerate}
79 \item Install C\+Make 2.\+6 or greater\+: \href{http://cmake.org/cmake/resources/software.html}{\tt http\+://cmake.\+org/cmake/resources/software.\+html}
80 \item Install Open\+S\+SL binaries. \href{http://www.openssl.org/related/binaries.html}{\tt http\+://www.\+openssl.\+org/related/binaries.\+html}
81
82 ({\bfseries N\+O\+TE}\+: Preferably in the default location to make it easier for C\+Make to find them)
83
84 {\bfseries N\+O\+T\+E2}\+: Be sure that O\+P\+E\+N\+S\+S\+L\+\_\+\+C\+O\+NF environment variable is defined and points at $<$\+Open\+S\+S\+L install=\char`\"{}\char`\"{} location$>$=\char`\"{}\char`\"{}$>$.cfg
85 \item Generate the Visual studio project by opening the Visual Studio cmd prompt\+:
86 \end{DoxyEnumerate}
87
88
89 \begin{DoxyCode}
90 1 cd <path to src>
91 2 md build
92 3 cd build
93 4 cmake -G "Visual Studio 10" ..
94 \end{DoxyCode}
95
96
97 ({\bfseries N\+O\+TE}\+: There is also a cmake-\/gui available on Windows if you prefer that)
98
99 {\bfseries N\+O\+T\+E2}\+: See this link to find out the version number corresponding to your Visual Studio edition\+: \href{http://superuser.com/a/194065}{\tt http\+://superuser.\+com/a/194065}
100
101
102 \begin{DoxyEnumerate}
103 \item Now you should have a generated Visual Studio Solution in your {\ttfamily $<$path to src$>$/build} directory, which can be used to build.
104 \item Some additional deps may be needed
105 \begin{DoxyItemize}
106 \item iphlpapi.\+lib
107 \item psapi.\+lib
108 \item userenv.\+lib
109 \end{DoxyItemize}
110 \item If you\textquotesingle{}re using libuv, you must make sure to compile libuv with the same multithread-\/dll / Mtd attributes as libwebsockets itself
111 \end{DoxyEnumerate}\hypertarget{md_README.build_cmwmgw}{}\section{Building on Windows (\+Min\+G\+W)}\label{md_README.build_cmwmgw}
112
113 \begin{DoxyEnumerate}
114 \item Install Min\+GW\+: \href{http://sourceforge.net/projects/mingw/files}{\tt http\+://sourceforge.\+net/projects/mingw/files}
115
116 ({\bfseries N\+O\+TE}\+: Preferably in the default location C\+:)
117 \item Fix up Min\+GW headers
118
119 a) Add the following lines to C\+:.h\+: 
120 \begin{DoxyCode}
121 1 #if(\_WIN32\_WINNT >= 0x0600)
122
123 3 typedef struct pollfd \{
124
125 5         SOCKET  fd;
126 6         SHORT   events;
127 7         SHORT   revents;
128
129 9 \} WSAPOLLFD, *PWSAPOLLFD, FAR *LPWSAPOLLFD;
130 10 
131 11 WINSOCK\_API\_LINKAGE int WSAAPI WSAPoll(LPWSAPOLLFD fdArray, ULONG fds, INT timeout);
132 12 
133 13 #endif // (\_WIN32\_WINNT >= 0x0600)
134 \end{DoxyCode}
135  b) Create C\+:.h and copy and paste the content from following link into it\+:
136
137 \href{http://wine-unstable.sourcearchive.com/documentation/1.1.32/mstcpip_8h-source.html}{\tt http\+://wine-\/unstable.\+sourcearchive.\+com/documentation/1.\+1.\+32/mstcpip\+\_\+8h-\/source.\+html}
138 \item Install C\+Make 2.\+6 or greater\+: \href{http://cmake.org/cmake/resources/software.html}{\tt http\+://cmake.\+org/cmake/resources/software.\+html}
139 \item Install Open\+S\+SL binaries. \href{http://www.openssl.org/related/binaries.html}{\tt http\+://www.\+openssl.\+org/related/binaries.\+html}
140
141 ({\bfseries N\+O\+TE}\+: Preferably in the default location to make it easier for C\+Make to find them)
142
143 {\bfseries N\+O\+T\+E2}\+: Be sure that O\+P\+E\+N\+S\+S\+L\+\_\+\+C\+O\+NF environment variable is defined and points at $<$\+Open\+S\+S\+L install=\char`\"{}\char`\"{} location$>$=\char`\"{}\char`\"{}$>$.cfg
144 \item Generate the build files (default is Make files) using M\+S\+YS shell\+: 
145 \begin{DoxyCode}
146 1 $ cd /drive/path/to/src
147 2 $ mkdir build
148 3 $ cd build
149 4 $ cmake -G "MSYS Makefiles" -DCMAKE\_INSTALL\_PREFIX=C:/MinGW ..
150 \end{DoxyCode}
151  ({\bfseries N\+O\+TE}\+: The {\ttfamily build/}{\ttfamily directory can have any name and be located anywhere on your filesystem, and that the argument}..` given to cmake is simply the source directory of {\bfseries libwebsockets} containing the \href{CMakeLists.txt}{\tt C\+Make\+Lists.\+txt} project file. All examples in this file assumes you use \char`\"{}..\char`\"{})
152
153 {\bfseries N\+O\+T\+E2}\+: To generate build files allowing to create libwebsockets binaries with debug information set the C\+M\+A\+K\+E\+\_\+\+B\+U\+I\+L\+D\+\_\+\+T\+Y\+PE flag to D\+E\+B\+UG\+: 
154 \begin{DoxyCode}
155 1 $ cmake -G "MSYS Makefiles" -DCMAKE\_INSTALL\_PREFIX=C:/MinGW -DCMAKE\_BUILD\_TYPE=DEBUG ..
156 \end{DoxyCode}
157
158 \item Finally you can build using the generated Makefile and get the results deployed into your Min\+GW installation\+:
159 \end{DoxyEnumerate}
160
161
162 \begin{DoxyCode}
163 1 $ make
164 2 $ make install
165 \end{DoxyCode}
166 \hypertarget{md_README.build_mbed3}{}\section{Building on mbed3}\label{md_README.build_mbed3}
167 M\+B\+E\+D3 is a non-\/posix embedded OS targeted on Cortex M class chips.
168
169 \href{https://www.mbed.com/}{\tt https\+://www.\+mbed.\+com/}
170
171 It\textquotesingle{}s quite unlike any other Posixy platform since the OS is linked statically in with lws to form one binary.
172
173 At the minute server-\/only is supported and due to bugs in mbed3 network support, the port is of alpha quality. However it can serve the test html, favicon.\+ico and logo png and may be able to make ws connections. The binary for that including the OS, test app, lws and all the assets is only 117\+KB.
174
175 0) Today mbed3 only properly works on F\+R\+DM K64F \$35 Freescale Dev Board with 1\+MB Flash, 256\+KB S\+R\+AM and Ethernet.
176
177 \href{http://www.freescale.com/products/arm-processors/kinetis-cortex-m/k-series/k6x-ethernet-mcus/freescale-freedom-development-platform-for-kinetis-k64-k63-and-k24-mcus:FRDM-K64F}{\tt http\+://www.\+freescale.\+com/products/arm-\/processors/kinetis-\/cortex-\/m/k-\/series/k6x-\/ethernet-\/mcus/freescale-\/freedom-\/development-\/platform-\/for-\/kinetis-\/k64-\/k63-\/and-\/k24-\/mcus\+:\+F\+R\+D\+M-\/\+K64F}
178
179 1) Get a working mbed3 environment with arm-\/none-\/eabi-\/cs toolchain (available in Fedora, Ubuntu and other distros)
180
181 2) Confirm you can build things using yotta by following the getting started guide here
182
183 \href{https://docs.mbed.com/docs/getting-started-mbed-os/en/latest/}{\tt https\+://docs.\+mbed.\+com/docs/getting-\/started-\/mbed-\/os/en/latest/}
184
185 3)
186
187 git clone \href{https://github.com/warmcat/lws-test-server}{\tt https\+://github.\+com/warmcat/lws-\/test-\/server}
188
189 and cd into it
190
191 4) mkdir -\/p yotta\+\_\+modules ; cd yotta\+\_\+modules
192
193 5) git clone \href{https://github.com/warmcat/libwebsockets}{\tt https\+://github.\+com/warmcat/libwebsockets} ; mv libwebsockets websockets ; cd ..
194
195 6) yotta target frdm-\/k64f-\/gcc
196
197 7) yotta install
198
199 8) yotta build\hypertarget{md_README.build_cmco}{}\section{Setting compile options}\label{md_README.build_cmco}
200 To set compile time flags you can either use one of the C\+Make gui applications or do it via command line.\hypertarget{md_README.build_cmcocl}{}\subsection{Command line}\label{md_README.build_cmcocl}
201 To list avaialable options (omit the H if you don\textquotesingle{}t want the help text)\+: \begin{DoxyVerb}    cmake -LH ..
202 \end{DoxyVerb}
203
204
205 Then to set an option and build (for example turn off S\+SL support)\+: \begin{DoxyVerb}    cmake -DLWS_WITH_SSL=0 ..
206 \end{DoxyVerb}
207  or cmake -\/\+D\+L\+W\+S\+\_\+\+W\+I\+T\+H\+\_\+\+S\+SL\+:B\+O\+OL=O\+FF ..\hypertarget{md_README.build_cmcoug}{}\subsection{Unix G\+UI}\label{md_README.build_cmcoug}
208 If you have a curses-\/enabled build you simply type\+: (not all packages include this, my debian install does not for example). \begin{DoxyVerb}    ccmake
209 \end{DoxyVerb}
210 \hypertarget{md_README.build_cmcowg}{}\subsection{Windows G\+UI}\label{md_README.build_cmcowg}
211 On windows C\+Make comes with a gui application\+: Start -\/$>$ Programs -\/$>$ C\+Make -\/$>$ C\+Make (cmake-\/gui)\hypertarget{md_README.build_wolf}{}\section{wolf\+S\+S\+L/\+Cya\+S\+S\+L replacement for Open\+S\+SL}\label{md_README.build_wolf}
212 wolf\+S\+S\+L/\+Cya\+S\+SL is a lightweight S\+SL library targeted at embedded systems\+: \href{https://www.wolfssl.com/wolfSSL/Products-wolfssl.html}{\tt https\+://www.\+wolfssl.\+com/wolf\+S\+S\+L/\+Products-\/wolfssl.\+html}
213
214 It contains a Open\+S\+SL compatibility layer which makes it possible to pretty much link to it instead of Open\+S\+SL, giving a much smaller footprint.
215
216 {\bfseries N\+O\+TE}\+: wolfssl needs to be compiled using the {\ttfamily -\/-\/enable-\/opensslextra} flag for this to work.\hypertarget{md_README.build_wolf1}{}\section{Compiling libwebsockets with wolf\+S\+SL}\label{md_README.build_wolf1}
217
218 \begin{DoxyCode}
219 1 cmake .. -DLWS\_USE\_WOLFSSL=1 \(\backslash\)
220 2          -DLWS\_WOLFSSL\_INCLUDE\_DIRS=/path/to/wolfssl \(\backslash\)
221 3          -DLWS\_WOLFSSL\_LIBRARIES=/path/to/wolfssl/wolfssl.a ..
222 \end{DoxyCode}
223
224
225 {\bfseries N\+O\+TE}\+: On windows use the .lib file extension for {\ttfamily L\+W\+S\+\_\+\+W\+O\+L\+F\+S\+S\+L\+\_\+\+L\+I\+B\+R\+A\+R\+I\+ES} instead.\hypertarget{md_README.build_cya}{}\section{Compiling libwebsockets with Cya\+S\+SL}\label{md_README.build_cya}
226
227 \begin{DoxyCode}
228 1 cmake .. -DLWS\_USE\_CYASSL=1 \(\backslash\)
229 2          -DLWS\_CYASSL\_INCLUDE\_DIRS=/path/to/cyassl \(\backslash\)
230 3          -DLWS\_CYASSL\_LIBRARIES=/path/to/wolfssl/cyassl.a ..
231 \end{DoxyCode}
232
233
234 {\bfseries N\+O\+TE}\+: On windows use the .lib file extension for {\ttfamily L\+W\+S\+\_\+\+C\+Y\+A\+S\+S\+L\+\_\+\+L\+I\+B\+R\+A\+R\+I\+ES} instead.\hypertarget{md_README.build_extplugins}{}\section{Building plugins outside of lws itself}\label{md_README.build_extplugins}
235 The directory ./plugin-\/standalone/ shows how easy it is to create plugins outside of lws itself. First build lws itself with -\/\+D\+L\+W\+S\+\_\+\+W\+I\+T\+H\+\_\+\+P\+L\+U\+G\+I\+NS, then use the same flow to build the standalone plugin 
236 \begin{DoxyCode}
237 1 cd ./plugin-standalone
238 2 mkdir build
239 3 cd build
240 4 cmake ..
241 5 make && sudo make install
242 \end{DoxyCode}
243
244
245 if you changed the default plugin directory when you built lws, you must also give the same arguments to cmake here (eg, {\ttfamily -\/\+D\+C\+M\+A\+K\+E\+\_\+\+I\+N\+S\+T\+A\+L\+L\+\_\+\+P\+R\+E\+F\+IX\+:P\+A\+TH=/usr/something/else...} )
246
247 Otherwise if you run lwsws or libwebsockets-\/test-\/server-\/v2.\+0, it will now find the additional plugin \char`\"{}libprotocol\+\_\+example\+\_\+standalone.\+so\char`\"{} 
248 \begin{DoxyCode}
249 1 lwsts[21257]:   Plugins:
250 2 lwsts[21257]:    libprotocol\_dumb\_increment.so
251 3 lwsts[21257]:    libprotocol\_example\_standalone.so
252 4 lwsts[21257]:    libprotocol\_lws\_mirror.so
253 5 lwsts[21257]:    libprotocol\_lws\_server\_status.so
254 6 lwsts[21257]:    libprotocol\_lws\_status.so
255 \end{DoxyCode}
256  If you have multiple vhosts, you must enable plugins at the vhost additionally, discovered plugins are not enabled automatically for security reasons. You do this using info-\/$>$pvo or for lwsws, in the J\+S\+ON config.\hypertarget{md_README.build_http2rp}{}\section{Reproducing H\+T\+T\+P2.\+0 tests}\label{md_README.build_http2rp}
257 You must have built and be running lws against a version of openssl that has A\+L\+PN / N\+PN. Most distros still have older versions. You\textquotesingle{}ll know it\textquotesingle{}s right by seeing 
258 \begin{DoxyCode}
259 1 lwsts[4752]:  Compiled with OpenSSL support
260 2 lwsts[4752]:  Using SSL mode
261 3 lwsts[4752]:  HTTP2 / ALPN enabled
262 \end{DoxyCode}
263  at lws startup.
264
265 For non-\/\+S\+SL H\+T\+T\+P2.\+0 upgrade 
266 \begin{DoxyCode}
267 1 $ nghttp -nvasu http://localhost:7681/test.htm
268 \end{DoxyCode}
269  For S\+SL / A\+L\+PN H\+T\+T\+P2.\+0 upgrade 
270 \begin{DoxyCode}
271 1 $ nghttp -nvas https://localhost:7681/test.html
272 \end{DoxyCode}
273 \hypertarget{md_README.build_cross}{}\section{Cross compiling}\label{md_README.build_cross}
274 To enable cross-\/compiling {\bfseries libwebsockets} using C\+Make you need to create a \char`\"{}\+Toolchain file\char`\"{} that you supply to C\+Make when generating your build files. C\+Make will then use the cross compilers and build paths specified in this file to look for dependencies and such.
275
276 {\bfseries Libwebsockets} includes an example toolchain file \href{cross-arm-linux-gnueabihf.cmake}{\tt cross-\/arm-\/linux-\/gnueabihf.\+cmake} you can use as a starting point.
277
278 The commandline to configure for cross with this would look like 
279 \begin{DoxyCode}
280 1 $ cmake .. -DCMAKE\_INSTALL\_PREFIX:PATH=/usr \(\backslash\)
281 2          -DCMAKE\_TOOLCHAIN\_FILE=../cross-arm-linux-gnueabihf.cmake \(\backslash\)
282 3          -DWITHOUT\_EXTENSIONS=1 -DWITH\_SSL=0
283 \end{DoxyCode}
284  The example shows how to build with no external cross lib dependencies, you need to provide the cross libraries otherwise.
285
286 {\bfseries N\+O\+TE}\+: start from an E\+M\+P\+TY build directory if you had a non-\/cross build in there before the settings will be cached and your changes ignored.
287
288 Additional information on cross compilation with C\+Make\+: \href{http://www.vtk.org/Wiki/CMake_Cross_Compiling}{\tt http\+://www.\+vtk.\+org/\+Wiki/\+C\+Make\+\_\+\+Cross\+\_\+\+Compiling}\hypertarget{md_README.build_mem}{}\section{Memory efficiency}\label{md_README.build_mem}
289 Embedded server-\/only configuration without extensions (ie, no compression on websocket connections), but with full v13 websocket features and http server, built on A\+RM Cortex-\/\+A9\+:
290
291 Update at 8dac94d (2013-\/02-\/18) 
292 \begin{DoxyCode}
293 1 $ ./configure --without-client --without-extensions --disable-debug --without-daemonize
294
295 3 Context Creation, 1024 fd limit[2]:   16720 (includes 12 bytes per fd)
296 4 Per-connection [3]:                      72 bytes, +1328 during headers
297
298 6 .text   .rodata .data   .bss
299 7 11512   2784    288     4
300 \end{DoxyCode}
301  This shows the impact of the major configuration with/without options at 13ba5bbc633ea962d46d using Ubuntu A\+RM on a Panda\+Board ES.
302
303 These are accounting for static allocations from the library elf, there are additional dynamic allocations via malloc. These are a bit old now but give the right idea for relative \char`\"{}expense\char`\"{} of features.
304
305 Static allocations, A\+R\+M9
306
307 \tabulinesep=1mm
308 \begin{longtabu} spread 0pt [c]{*5{|X[-1]}|}
309 \hline
310 \rowcolor{\tableheadbgcolor}{\bf }&{\bf .text }&{\bf .rodata }&{\bf .data }&{\bf .bss  }\\\cline{1-5}
311 \endfirsthead
312 \hline
313 \endfoot
314 \hline
315 \rowcolor{\tableheadbgcolor}{\bf }&{\bf .text }&{\bf .rodata }&{\bf .data }&{\bf .bss  }\\\cline{1-5}
316 \endhead
317 All (no without) &35024 &9940 &336 &4104 \\\cline{1-5}
318 without client &25684 &7144 &336 &4104 \\\cline{1-5}
319 without client, exts &21652 &6288 &288 &4104 \\\cline{1-5}
320 without client, exts, debug\mbox{[}1\mbox{]} &19756 &3768 &288 &4104 \\\cline{1-5}
321 without server &30304 &8160 &336 &4104 \\\cline{1-5}
322 without server, exts &25382 &7204 &288 &4104 \\\cline{1-5}
323 without server, exts, debug\mbox{[}1\mbox{]} &23712 &4256 &288 &4104 \\\cline{1-5}
324 \end{longtabu}
325 \mbox{[}1\mbox{]} {\ttfamily -\/-\/disable-\/debug} only removes messages below {\ttfamily lwsl\+\_\+notice}. Since that is the default logging level the impact is not noticeable, error, warn and notice logs are all still there.
326
327 \mbox{[}2\mbox{]} {\ttfamily 1024} fd per process is the default limit (set by ulimit) in at least Fedora and Ubuntu. You can make significant savings tailoring this to actual expected peak fds, ie, at a limit of {\ttfamily 20}, context creation allocation reduces to {\ttfamily 4432 + 240 = 4672})
328
329 \mbox{[}3\mbox{]} known header content is freed after connection establishment