Files
CyberPanel/install/openlitespeed-1.4.28/dist/docs/ServTuning_Help.html

143 lines
38 KiB
HTML
Raw Normal View History

2017-12-09 22:30:10 +05:00
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>OpenLiteSpeed Users' Manual - Server Tuning</title>
<meta name="description" content="OpenLiteSpeed Users' Manual - Server Tuning." />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="shortcut icon" href="img/favicon.ico" />
<link rel="stylesheet" type="text/css" href="css/hdoc.css">
</head>
<body>
<div class="pagewrapper clearfix"><aside class="sidetree ls-col-1-5">
<figure>
<img src="img/ols_logo.svg" alt="openlitespeed logo" width="150px"/>
</figure>
<h3 class="ls-text-thin">OpenLiteSpeed Web Server <a href="index.html"> Users' Manual</a></h3>
<h5 class="ls-text-muted">Version 1.4 &nbsp;&#8212;&nbsp;Rev. 6</h5>
<hr/>
<div>
<ul>
<li><a href="license.html">License</a></li>
<li><a href="intro.html">Introduction</a></li>
<li><a href="install.html">Installation</a></li>
<li><a href="admin.html">Administration</a>
<ul class="level2"><li><a href="ServerStat_Help.html">Service Manager</a></li></ul></li>
<li><a href="security.html">Security</a></li>
<li><a href="config.html">Configuration</a>
<ul class="level2">
<li><a href="ServGeneral_Help.html">Server General</a></li>
<li><a href="ServLog_Help.html">Server Log</a></li>
<li><span class="current"><a href="ServTuning_Help.html">Server Tuning</a></span></li>
<li><a href="ServSecurity_Help.html">Server Security</a></li>
<li><a href="ExtApp_Help.html">External Apps</a></li>
<ul class="level3">
<li><a href="External_FCGI.html">Fast CGI App</a></li>
<li><a href="External_FCGI_Auth.html">Fast CGI Authorizer</a></li>
<li><a href="External_LSAPI.html">LSAPI App</a></li>
<li><a href="External_Servlet.html">Servlet Engine</a></li>
<li><a href="External_WS.html">Web Server</a></li>
<li><a href="External_PL.html">Piped logger</a></li>
<li><a href="External_LB.html">Load Balancer</a></li>
</ul>
<li><a href="ScriptHandler_Help.html">Script Handler</a></li>
<li><a href="Rails_Help.html">Rack/Rails Settings</a></li>
<li><a href="Module_Help.html">Module Configuration</a></li>
<li><a href="Listeners_General_Help.html">Listener General</a></li>
<li><a href="Listeners_SSL_Help.html">Listener SSL</a></li>
<li><a href="Templates_Help.html">Templates</a></li>
<li><a href="VirtualHosts_Help.html">Virtual Host Basic</a></li>
<li><a href="VHGeneral_Help.html">Virtual Host General</a></li>
<li><a href="VHSecurity_Help.html">Virtual Host Security</a></li>
<li><a href="VHSSL_Help.html">Virtual Host SSL</a></li>
<li><a href="Rewrite_Help.html">Rewrite</a></li>
<li><a href="Context_Help.html">Context</a></li>
<ul class="level3">
<li><a href="Static_Context.html">Static Context</a></li>
<li><a href="Java_Web_App_Context.html">Java Web App Context</a></li>
<li><a href="Servlet_Context.html">Servlet Context</a></li>
<li><a href="FCGI_Context.html">Fast CGI Context</a></li>
<li><a href="LSAPI_Context.html">LSAPI Context</a></li>
<li><a href="Proxy_Context.html">Proxy Context</a></li>
<li><a href="CGI_Context.html">CGI Context</a></li>
<li><a href="LB_Context.html">Load Balancer Context</a></li>
<li><a href="Redirect_Context.html">Redirect Context</a></li>
<li><a href="Rails_Context.html">Rack/Rails Context</a></li>
<li><a href="Module_Context.html">Module Handler Context</a></li>
</ul>
<li><a href="VHWebSocket_Help.html">Web Socket Proxy</a></li>
</ul>
</li>
<li><a href="webconsole.html">Web Console</a>
<ul class="level2">
<li><a href="AdminGeneral_Help.html">Admin Console General</a></li>
<li><a href="AdminSecurity_Help.html">Admin Console Security</a></li>
<li><a href="AdminListeners_General_Help.html">Admin Listener General</a></li>
<li><a href="AdminListeners_SSL_Help.html">Admin Listener SSL</a></li>
</ul>
</li>
</ul>
</div>
</aside>
<article class="contentwrapper ls-col-3-5 clearfix"><div class="nav-bar ls-spacer-micro-top"><div class="prev">&#171 <a href="ServLog_Help.html">Server Log</a></div><div class="center"><a href="config.html">Configuration</a></div><div class="next"><a href="ServSecurity_Help.html">Server Security</a> &#187;</div></div>
<h1>Server Tuning</h1><h2 id="top">Table of Contents</h2><section class="toc"><section class="toc-row"><header>OS Optimization</header><p>
<a href="#eventDispatcher">I/O Event Dispatcher</a> | <a href="#shmDefaultDir">Default SHM Directory</a></p></section>
<section class="toc-row"><header>Connection Tuning</header><p>
<a href="#maxConnections">Max Connections</a> | <a href="#maxSSLConnections">Max SSL Connections</a> | <a href="#connTimeout">Connection Timeout (secs)</a> | <a href="#maxKeepAliveReq">Max Keep-Alive Requests</a> | <a href="#smartKeepAlive">Smart Keep-Alive</a> | <a href="#keepAliveTimeout">Keep-Alive Timeout (secs)</a> | <a href="#sndBufSize">Send Buffer Size (bytes)</a> | <a href="#rcvBufSize">Receive Buffer Size (bytes)</a></p></section>
<section class="toc-row"><header>Request/Response Tuning</header><p>
<a href="#maxReqURLLen">Max Request URL Length (bytes)</a> | <a href="#maxReqHeaderSize">Max Request Header Size (bytes)</a> | <a href="#maxReqBodySize">Max Request Body Size (bytes)</a> | <a href="#maxDynRespHeaderSize">Max Dynamic Response Header Size (bytes)</a> | <a href="#maxDynRespSize">Max Dynamic Response Body Size (bytes)</a></p></section>
<section class="toc-row"><header>Static File Delivery Optimization</header><p>
<a href="#maxCachedFileSize">Max Cached Small File Size (bytes)</a> | <a href="#totalInMemCacheSize">Total Small File Cache Size (bytes)</a> | <a href="#maxMMapFileSize">Max MMAP File Size (bytes)</a> | <a href="#totalMMapCacheSize">Total MMAP Cache Size (bytes)</a> | <a href="#useSendfile">Use sendfile()</a> | <a href="#fileETag">File ETag</a></p></section>
<section class="toc-row"><header>GZIP Compression Tuning</header><p>
<a href="#enableGzipCompress">Enable Compression</a> | <a href="#enableDynGzipCompress">Enable Dynamic Compression</a> | <a href="#gzipCompressLevel">Compression Level (Dynamic Content)</a> | <a href="#compressibleTypes">Compressible Types</a> | <a href="#gzipAutoUpdateStatic">Auto Update Static File</a> | <a href="#gzipCacheDir">Static GZIP Cache Directory</a> | <a href="#gzipStaticCompressLevel">Compression Level (Static Content)</a> | <a href="#gzipMaxFileSize">Max Static File Size (bytes)</a> | <a href="#gzipMinFileSize">Min Static File Size (bytes)</a></p></section>
<section class="toc-row"><header>Brotli Compression</header><p>
<a href="#enableBrCompress">Enable Brotli Compression</a> | <a href="#brStaticCompressLevel">Compression Level (Static File)</a></p></section>
<section class="toc-row"><header>SSL Global Setting</header><p>
<a href="#SSLStrongDhKey">SSL Strong DH Key</a> | <a href="#sslEnableMultiCerts">Enable Multiple SSL Certificates</a> | <a href="#sslSessionCache">Enable Session Cache</a> | <a href="#sslSessionCacheSize">Session Cache Size (bytes)</a> | <a href="#sslSessionCacheTimeout">Session Cache Timeout (secs)</a> | <a href="#sslSessionTickets">Enable Session Tickets</a> | <a href="#sslSessionTicketLifetime">SSL Session Ticket Lifetime (secs)</a> | <a href="#sslSessionTicketKeyFile">SSL Session Ticket Key File</a></p></section>
</section>
<section><div class="helpitem"><article class="ls-helpitem"><div><header id="eventDispatcher"><h3>I/O Event Dispatcher<span class="ls-permlink"><a href="#eventDispatcher"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies which I/O event dispatcher to use. Different operating systems support different types of event dispatcher: <ul> <li>Linux kernel 2.4.x supports: <ul><li>poll</li></ul> </li> <li>Linux kernel 2.6.x supports: <ul><li>poll</li><li>epoll</li></ul> </li> <li>FreeBSD supports: <ul><li>poll</li><li>kqueue</li></ul> </li> <li>Solaris supports: <ul><li>poll</li><li>devpoll</li></ul> </li> <li>Mac OS X 10.3 and above supports: <ul><li>poll</li><li>kqueue</li></ul> </li> </ul> <span class="val">poll</span> is supported by all platforms, and is the default selection. For high traffic web sites, an altenative event dispatcher can be used to improve the scalability of the server.</p> <h4>Syntax</h4><p>Select from drop down list</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="shmDefaultDir"><h3>Default SHM Directory<span class="ls-permlink"><a href="#shmDefaultDir"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Changes shared memory's default directory to the specified path. If the directory does not exist, it will be created. All SHM data will be stored in this directory unless otherwise specified.</p> <h4>Syntax</h4><p>Path</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="maxConnections"><h3>Max Connections<span class="ls-permlink"><a href="#maxConnections"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies the maximum number of concurrent connections that the server can accept. This includes both plain TCP connections and SSL connections. Once the maximum concurrent connections limit is reached, the server will close Keep-Alive connections when they complete active requests.</p> <h4>Syntax</h4><p>Integer number</p> <h4>Tips</h4><p><span title="Information" class="ls-icon-info"></span> When the server is started by "root" user, the server will try to adjust the per-process file descriptor limits automatically, however, if this fails, you may need to increase this limit manually.</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="maxSSLConnections"><h3>Max SSL Connections<span class="ls-permlink"><a href="#maxSSLConnections"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies the maximum number of concurrent SSL connections the server will accept. Since total concurrent SSL and non-SSL connections cannot exceed the limit specified by <span class="tagl"><a href="#maxConnections">Max Connections</a></span>, the actual number of concurrent SSL connections allowed must be lower than this limit.</p> <h4>Syntax</h4><p>Integer number</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="connTimeout"><h3>Connection Timeout (secs)<span class="ls-permlink"><a href="#connTimeout"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies the maximum connection idle time allowed during processing one request. The connection will be closed if it has been idle, i.e. no I/O activity, for this period of time.</p> <h4>Syntax</h4><p>Integer number</p> <h4>Tips</h4><p><span title="Security" class="ls-icon-security"></span> Set this as low as you can to help recover dead connections during a potential DoS attack.</p> <h4>See Also</h4><p class="ls-text-small"><span class="tagl"><a href="#keepAliveTimeout">Keep-Alive Timeout (secs)</a></span></p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="maxKeepAliveReq"><h3>Max Keep-Alive Requests<span class="ls-permlink"><a href="#maxKeepAliveReq"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies the maximum number of requests that can be served through a keep-alive (persistent) session. The connection will be closed once this limit is reached. You can set this limit for each virtual host as well.</p> <h4>Syntax</h4><p>Integer number</p> <h4>Tips</h4><p><span title="Performance" class="ls-icon-performance"></span> Set this to a reasonably high value. A value of "1" or "0" will disable keep-alive.</p> <h4>See Also</h4><p class="ls-text-small">Virtual Host <span class="tagl"><a href="VirtualHosts_Help.html#vhMaxKeepAliveReq">Max Keep-Alive Requests</a></span></p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="smartKeepAlive"><h3>Smart Keep-Alive<span class="ls-permlink"><a href="#smartKeepAlive"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies whether to turn on Smart Keep-Alive. This option is effective only if <span class="tagl"><a href="#maxKeepAliveReq">Max Keep-Alive Requests</a></span> is greater than 1. If enabled, you can also enable/disable it at the virtual host level. Smart keep-alive will only establish keep-alive connections for requests of JavaScript, CSS Style Sheet, and image files. For html pages, the connection will not be kept alive. This will help serve more users more efficiently. Normally a web page contains multiple images and scripts that will be cached by the browser after the initial request. It is more efficient to send those non-html static files through a single keep-alive connection and have the text/html file sent through another non-keep-alive connection. This method will reduce idle connections and in turn increase the capacity to handle more concurrent requests and users.</p> <h4>Syntax</h4><p>Select from radio box</p> <h4>Tips</h4><p><span title="Performance" class="ls-icon-performance"></span> Enable this for high-load web sites.</p> <h4>See Also</h4><p class="ls-text-small">Virtual Host <span class="tagl"><a href="VirtualHosts_Help.html#vhSmartKeepAlive">Smart Keep-Alive</a></span></p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="keepAliveTimeout"><h3>Keep-Alive Timeout (secs)<span class="ls-permlink"><a href="#keepAliveTimeout"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies the maximum idle time between requests from a keep-alive connection. If no new request is received during this period of time, the connection will be closed. This setting only applies to HTTP/1.1 connections. HTTP/2 connections have long keep-alive timeouts by design and are not affected by this setting.</p> <h4>Syntax</h4><p>Integer number</p> <h4>Tips</h4><p><span title="Security" class="ls-icon-security"></span><span title="Performance" class="ls-icon-performance"></span> We recommend that you set this value just long enough to wait for subsequent requests from a client when there are more assets referenced by a single page that need to be loaded. Do not set this too long hoping that the next page will be served over the keep-alive connection. Keeping many idle keep-alive connections is a waste of server resources and could be taken advantage of by (D)DoS attacks. <span class="val">2-5</span> seconds is a reasonable range for most applications. LiteSpeed is highly efficient in a non-keep-alive environment.</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="sndBufSize"><h3>Send Buffer Size (bytes)<span class="ls-permlink"><a href="#sndBufSize"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>The sending buffer size of each TCP socket. <span class="val">512K</span> is the maximum allowed buffer size.</p> <h4>Syntax</h4><p>Integer number</p> <h4>Tips</h4><p><span title="Performance" class="ls-icon-performance"></span> It is recommended to leave this value as "Not Set" or set to 0 to use the operating system's default buffer size.<br/> <span title="Performance" class="ls-icon-performance"></span> If your web site serves large static files, increase the send buffer size to improve performance.<br/> <span title="Performance" class="ls-icon-performance"></span> Setting this to a lower value will reduce throughput and memory usage per socket allowing the server to have more concurrent sockets when memory is a bottleneck.</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="rcvBufSize"><h3>Receive Buffer Size (bytes)<span class="ls-permlink"><a href="#rcvBufSize"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>The receiving buffer size of each TCP socket. <span class="val">512K</span> is the maximum allowed buffer size.</p> <h4>Syntax</h4><p>Integer number</p> <h4>Tips</h4><p><span title="Performance" class="ls-icon-performance"></span> It is recommended to leave this value as "Not Set" or set to 0 to use the operating system's default buffer size.<br/> <span title="Performance" class="ls-icon-performance"></span> A large receive buffer will increase performance when processing incoming requests with large payloads, i.e. file uploads.<br/> <span title="Performance" class="ls-icon-performance"></span> Setting this to a lower value will reduce throughput and memory usage per socket allowing the server to have more concurrent sockets when memory is a bottleneck.</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="maxReqURLLen"><h3>Max Request URL Length (bytes)<span class="ls-permlink"><a href="#maxReqURLLen"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies the maximum size of a request URL. URL is the full text address used to access a server resource including the query string. <span class="val">8192</span> bytes is the hard limit.</p> <h4>Syntax</h4><p>Integer number</p> <h4>Tips</h4><p><span title="Security" class="ls-icon-security"></span><span title="Performance" class="ls-icon-performance"></span> Set it reasonably low to reduce memory usage and help identify bogus requests and DoS attacks. <br/> 2-3K is big enough for most web sites unless the HTTP GET method is used with large query strings instead of POST.</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="maxReqHeaderSize"><h3>Max Request Header Size (bytes)<span class="ls-permlink"><a href="#maxReqHeaderSize"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies the maximum size of an HTTP request header including request URL. Hard limit is <span class="val">16380</span> bytes.</p> <h4>Syntax</h4><p>Integer number</p> <h4>Tips</h4><p><span title="Security" class="ls-icon-security"></span><span title="Performance" class="ls-icon-performance"></span> Set it reasonably low to reduce memory usage and help identify bogus requests and DoS attacks.<br/> 4-8K is big enough for most web sites.</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="maxReqBodySize"><h3>Max Request Body Size (bytes)<span class="ls-permlink"><a href="#maxReqBodySize"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies the maximum size of an HTTP request body. For a 32Bit OS, <span class="val">2GB</span> is the hard limit. For a 64Bit OS, it is virtually unlimited.</p> <h4>Syntax</h4><p>Integer number</p> <h4>Tips</h4><p><span title="Security" class="ls-icon-security"></span> To help prevent DoS attacks, try to constrain this limit to only what is really needed. Your swapping space must have enough free space to accommodate this limit.</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="maxDynRespHeaderSize"><h3>Max Dynamic Response Header Size (bytes)<span class="ls-permlink"><a href="#maxDynRespHeaderSize"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies the maximum header size of a dynamically generated response. Hard limit is <span class="val">8KB</span>.</p> <h4>Syntax</h4><p>Integer number</p> <h4>Tips</h4><p><span title="Performance" class="ls-icon-performance"></span> Set it reasonably low to help recognize bad responses dynamically generated by external applications.</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="maxDynRespSize"><h3>Max Dynamic Response Body Size (bytes)<span class="ls-permlink"><a href="#maxDynRespSize"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies the maximum body size of a dynamically generated response. Hard limit is <span class="val">2047MB</span>.</p> <h4>Syntax</h4><p>Integer number</p> <h4>Tips</h4><p><span title="Performance" class="ls-icon-performance"></span> Set the limit reasonably low to help identify bad responses. It is not uncommon to malformed scripts to contain an infinite loop which leads to infinity-sized responses.</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="maxCachedFileSize"><h3>Max Cached Small File Size (bytes)<span class="ls-permlink"><a href="#maxCachedFileSize"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies the largest static file that will be cached in a pre-allocated memory buffer. Static files can be served in four different ways: memory buffer cache, memory-mapped cache, plain read/write, and sendfile(). Files whose size is smaller than this setting are served from memory buffer cache. Files whose size is larger than this setting, but smaller than the <span class="tagl"><a href="#maxMMapFileSize">Max MMAP File Size (bytes)</a></span> will be served from memory-mapped cache. Files whose size is larger than the <span class="tagl"><a href="#maxMMapFileSize">Max MMAP File Size (bytes)</a></span> will be served via plain read/write or sendfile(). It is optimal to serve static files smaller than 4K from the memory buffer cache.</p> <h4>Syntax</h4><p>Integer number</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="totalInMemCacheSize"><h3>Total Small File Cache Size (bytes)<span class="ls-permlink"><a href="#totalInMemCacheSize"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies the total memory that can be allocated to the buffer cache in order to cache/serve small static files.</p> <h4>Syntax</h4><p>Integer number</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="maxMMapFileSize"><h3>Max MMAP File Size (bytes)<span class="ls-permlink"><a href="#maxMMapFileSize"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies the largest static file that will be memory mapped (MMAP). Static files can be served in four different ways: memory buffer cache, memory-mapped cache, plain read/write, and sendfile(). Files whose size is smaller than the <span class="tagl"><a href="#maxCachedFileSize">Max Cached Small File Size (bytes)</a></span> are served from memory buffer cache. Files whose size is larger than the <span class="tagl"><a href="#maxCachedFileSize">Max Cached Small File Size (bytes)</a></span>, but smaller than the Max MMAP File Size will be served from memory-mapped cache. Files whose size is larger than the Max MMAP File Size will be served via plain read/write or sendfile(). Since the server has a 32bit address space (2GB), it is not recommended to memory map very large files.</p> <h4>Syntax</h4><p>Integer number</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="totalMMapCacheSize"><h3>Total MMAP Cache Size (bytes)<span class="ls-permlink"><a href="#totalMMapCacheSize"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies the total memory that can be allocated for memory- mapped cache in order to cache/serve medium sized static files.</p> <h4>Syntax</h4><p>Integer number</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="useSendfile"><h3>Use sendfile()<span class="ls-permlink"><a href="#useSendfile"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies whether to use the sendfile() system call to serve static files. Static files can be served in four different ways: memory buffer cache, memory-mapped cache, plain read/write, and sendfile(). Files smaller than the <span class="tagl"><a href="#maxCachedFileSize">Max Cached Small File Size (bytes)</a></span> are served from memory buffer cache. Files larger than the <span class="tagl"><a href="#maxCachedFileSize">Max Cached Small File Size (bytes)</a></span> but smaller than the <span class="tagl"><a href="#maxMMapFileSize">Max MMAP File Size (bytes)</a></span> will be served from memory-mapped cache. Files larger than the <span class="tagl"><a href="#maxMMapFileSize">Max MMAP File Size (bytes)</a></span> will be served via plain read/write or sendfile(). Sendfile() is a "zero copy" system call that can greatly reduce CPU utilization when serving very large static files. Sendfile() requires an optimized network card kernel driver and thus may not be suitable for some small-vendor network adapters.</p> <h4>Syntax</h4><p>Select from radio box</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="fileETag"><h3>File ETag<span class="ls-permlink"><a href="#fileETag"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies whether to use a file's inode, last-modified time, and size attributes to generate the ETag HTTP response header for static files. All three attributes are enabled by default. If you plan to serve the same file out of mirrored servers, you should not include inode; otherwise, the ETag generated for one file will be different on different servers.</p> <h4>Syntax</h4><p>Select from checkbox</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="enableGzipCompress"><h3>Enable Compression<span class="ls-permlink"><a href="#enableGzipCompress"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Controls GZIP compression for both static and dynamic HTTP responses.</p> <h4>Syntax</h4><p>Select from radio box</p> <h4>Tips</h4><p><span title="Performance" class="ls-icon-performance"></span> Enable it to save network bandwidth. Text-based responses such as html, css, and javascript files benefit the most and on average can be compressed to half of their original size.</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="enableDynGzipCompress"><h3>Enable Dynamic Compression<span class="ls-permlink"><a href="#enableDynGzipCompress"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Controls GZIP compression for dynamically generated HTTP response. <span class="tagl"><a href="#enableGzipCompress">Enable Compression</a></span> must be set to <span class="val">Yes</span> in order to enable dynamic GZIP compression.</p> <h4>Syntax</h4><p>Select from radio box</p> <h4>Tips</h4><p><span title="Performance" class="ls-icon-performance"></span> Compressing dynamic responses increases CPU and memory utilization but saves network bandwidth.</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="gzipCompressLevel"><h3>Compression Level (Dynamic Content)<span class="ls-permlink"><a href="#gzipCompressLevel"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies the level of compression for dynamic content. Ranges from <span class="val">1</span> (lowest) to <span class="val">9</span> (highest). The default is <span class="val">2</span>.</p> <h4>Syntax</h4><p>Number between 1 and 9.</p> <h4>Tips</h4><p><span title="Performance" class="ls-icon-performance"></span> Higher compression level will use more memory and CPU cycles. You can set it to a higher level if your machine has additional power. There is not much difference between 6 and 9, except 9 uses many more CPU cycles.</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="compressibleTypes"><h3>Compressible Types<span class="ls-permlink"><a href="#compressibleTypes"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies what MIME types are allowed to be compressed.</p> <h4>Syntax</h4><p>MIME type list separated by commas. Wild card "*" and negate sign "!" are allowed, such as text/*, !text/js.</p> <h4>Example</h4><div class="ls-example">If you want to compress text/* but not text/css, you can have a rule like <span class="val">text/*, !text/css</span>. "!" will exclude that MIME type.</div><h4>Tips</h4><p><span title="Performance" class="ls-icon-performance"></span> Only allow types that will benefit from GZIP compression. Binary files such as gif/png/jpeg images and flash files do not benefit from compression.</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="gzipAutoUpdateStatic"><h3>Auto Update Static File<span class="ls-permlink"><a href="#gzipAutoUpdateStatic"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies whether to let the server automatically create/update GZIP-compressed versions of compressible static files or not. If set to <span class="val">Yes</span>, when a file with a MIME type listed in <span class="tagl"><a href="#compressibleTypes">Compressible Types</a></span> is requested, the server may create or update the corresponding compressed version of the file depending on the compressed file's timestamp. This compressed file is created under the <span class="tagl"><a href="#gzipCacheDir">Static GZIP Cache Directory</a></span>. The filename is based on a MD5 hash of the path of the original file.</p> <h4>Syntax</h4><p>Select from radio box</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="gzipCacheDir"><h3>Static GZIP Cache Directory<span class="ls-permlink"><a href="#gzipCacheDir"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies the path of the directory used to store compressed files for static content. The default is <span class="tagl"><a href="#swappingDir">Swapping Directory</a></span>.</p> <h4>Syntax</h4><p>Directory Path</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="gzipStaticCompressLevel"><h3>Compression Level (Static Content)<span class="ls-permlink"><a href="#gzipStaticCompressLevel"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies the level of compression for static content. Ranges from <span class="val">1</span> (lowest) to <span class="val">9</span> (highest). The default is <span class="val">6</span>.</p> <h4>Syntax</h4><p>Number between 1 and 9.</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="gzipMaxFileSize"><h3>Max Static File Size (bytes)<span class="ls-permlink"><a href="#gzipMaxFileSize"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies the maximum size of a static file for which the server will create a compressed file automatically.</p> <h4>Syntax</h4><p>Number in bytes not less than 1K.</p> <h4>Tips</h4><p><span title="Performance" class="ls-icon-performance"></span> It is not recommended to have the server create/update compressed files for large files. Compressing blocks an entire server process and no further requests can be processed until the compression is completed.</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="gzipMinFileSize"><h3>Min Static File Size (bytes)<span class="ls-permlink"><a href="#gzipMinFileSize"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies the minimum size of a static file for which the server will create a corresponding compressed file.</p> <h4>Syntax</h4><p>Number in bytes not less than 200.</p> <h4>Tips</h4><p><span title="Information" class="ls-icon-info"></span> It is not necessary to compress very small files as the bandwidth saving is negligible.</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="enableBrCompress"><h3>Enable Brotli Compression<span class="ls-permlink"><a href="#enableBrCompress"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Controls Brotli compression for static HTTP responses. The default value is enabled.</p> <h4>Syntax</h4><p>Select from radio box</p> <h4>Tips</h4><p><span title="Performance" class="ls-icon-performance"></span> Enable it to save network bandwidth. Text-based responses such as html, css, and javascript files benefit the most and on average can be compressed to half of their original size.</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="brStaticCompressLevel"><h3>Compression Level (Static File)<span class="ls-permlink"><a href="#brStaticCompressLevel"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies the level of compression for static content. Ranges from <span class="val">1</span> (lowest) to <span class="val">9</span> (highest). The default is <span class="val">5</span>.</p> <h4>Syntax</h4><p>Number between 1 and 9.</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="SSLStrongDhKey"><h3>SSL Strong DH Key<span class="ls-permlink"><a href="#SSLStrongDhKey"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Specifies whether to use 2048 or 1024 bit DH keys for SSL handshakes. If set to "Yes", 2048 bit DH keys will be used for 2048 bit SSL keys and certificates. 1024 bit DH keys will still be used in other situations. Default is "Yes".<br/><br/> Earlier versions of Java do not support DH key size higher than 1024 bits. If Java client compatibility is required, this should be set to "No".</p> <h4>Syntax</h4><p>radio</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="sslEnableMultiCerts"><h3>Enable Multiple SSL Certificates<span class="ls-permlink"><a href="#sslEnableMultiCerts"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Allows listeners/vhosts to set multiple SSL certificates. If multiple certificates are enabled, the certificates/keys are expected to follow a naming scheme. If the cert is named server.crt, other possible cert names are server.crt.rsa, server.crt.dsa, server.crt.ecc. If "Not Set", defaults to "No".</p> <h4>Syntax</h4><p>Select from radio box</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="sslSessionCache"><h3>Enable Session Cache<span class="ls-permlink"><a href="#sslSessionCache"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Enables session id caching. If "Not Set", defaults to "No". (Openssl Default)</p> <h4>Syntax</h4><p>Select from radio box</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="sslSessionCacheSize"><h3>Session Cache Size (bytes)<span class="ls-permlink"><a href="#sslSessionCacheSize"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Sets the maximum number of SSL session IDs to store in the cache. Default is 1,000,000.</p> <h4>Syntax</h4><p>Integer number</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="sslSessionCacheTimeout"><h3>Session Cache Timeout (secs)<span class="ls-permlink"><a href="#sslSessionCacheTimeout"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>This value determines how long a session ID will be valid within the cache before renegotiation is required. Default is 3,600.</p> <h4>Syntax</h4><p>Integer number</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="sslSessionTickets"><h3>Enable Session Tickets<span class="ls-permlink"><a href="#sslSessionTickets"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Enables session tickets. If "Not Set", the server will use openSSL's default ticket.</p> <h4>Syntax</h4><p>Select from radio box</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="sslSessionTicketLifetime"><h3>SSL Session Ticket Lifetime (secs)<span class="ls-permlink"><a href="#sslSessionTicketLifetime"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>This value determines how long a session ticket will be valid before a renegotiation is required. Default is 3,600.</p> <h4>Syntax</h4><p>Integer number</p> </article> </div>
<div class="helpitem"><article class="ls-helpitem"><div><header id="sslSessionTicketKeyFile"><h3>SSL Session Ticket Key File<span class="ls-permlink"><a href="#sslSessionTicketKeyFile"></a></span><span class="top"><a href="#top">&#8657;</a></span></h3></header></div><h4>Description</h4><p>Allows the SSL Ticket Key to be created/maintained by an administrator. The file must be 48 bytes long. If this option is left empty, the load balancer will generate and rotate its own set of keys. <br/><br/> IMPORTANT: To maintain forward secrecy, it is strongly recommended to change the key every <b>SSL Session Ticket Lifetime</b> seconds. If this cannot be done, it is recommended to leave this field empty.</p> <h4>Syntax</h4><p>Path</p> </article> </div>
</section>
</article><div class="ls-col-1-1"><footer class="copyright">Copyright &copy; 2013-2017. <a href="https://www.litespeedtech.com">LiteSpeed Technologies Inc.</a> All rights reserved.</footer>
</div></div>
</body>
</html>