Server Tuning
 
Table of Contents
Connection Tuning Max Connections   Max SSL Connections   Connection Timeout   Max Keep-Alive Requests   Keep-Alive Timeout   Send Buffer Size   Receive Buffer Size   
Request/Response Tuning Max Request URL Length   Max Request Header Size   Max Request Body Size   Max Dynamic Response Header Size   Max Dynamic Response Body Size   
GZIP Compression Tuning Enable Compression   Enable Dynamic Compression   Compression Level (Dynamic Content)   Compressible Types   Auto Update Static File   Compression Level (Static Content)   Max Static File Size   Min Static File Size   
 
Max ConnectionsGo to top
Description: Specifies the maximum concurrent connections that the server can accept. It includes both plain TCP connections and SSL connections. It should not exceed the hard limit set by the server: 400 for Standard Edition, 2048 for Professional Edition; otherwise the hard limit is used. Once this limit is reached, the server will close current Keep-Alive connection when it finishes processing current request.
Syntax: Integer number
Apply: On the fly with reload.
Tips: Increase the per process file descriptor limit if needed. See corresponding HOWTO.
Max SSL ConnectionsGo to top
Description: Specifies the maximum concurrent SSL connections that the server will accept. Since total concurrent SSL and non-SSL connections will not exceed the limit specified by Max Connections, so the actual number of concurrent SSL connections allowed could be lower than this limit.
Syntax: Integer number
Apply: On the fly with reload.
Connection TimeoutGo to top
Description: Specifies the maximum allowed connection idle time during processing one request. The connection will be closed whenever it is idle with no I/O activities for this period of time.
Syntax: Integer number
Apply: On the fly with reload.
Tips: [Security] Set it as low and reasonable as you can, it helps recover dead connections during possible DoS attack.
Max Keep-Alive RequestsGo to top
Description: Specifies the maximum requests that can be served through a Keep-Alive (Persistent) connection. Connection will be closed once this limit is reached.
Syntax: Integer number
Apply: On the fly with reload.
Tips: [Performance] Set it as high and reasonable as you can, set it <= 1 will disable Keep-Alive.
Keep-Alive TimeoutGo to top
Description: Specifies the maximum idle time between requests from a Keep-Alive connection. If no new request received during this period of time, the connection will be closed.
Syntax: Integer number
Apply: On the fly with reload.
Tips: [Security & Performance] Set it properly that will keep connections alive for most requests and at same time will guard against DoS attack. 15-30 seconds is a reasonable range for most application.
Send Buffer SizeGo to top
Description: The sending buffer size of TCP socket. Set to 0 to use the default buffer size of the operating system. 65535 is the maximum allowed buffer size.
Syntax: Integer number
Apply: Restart required.
Tips: [Performance] If your web site serves some big files, increase the send buffer size will improve the performance.
Receive Buffer SizeGo to top
Description: The receiving buffer size of TCP socket. Set to 0 to use the default buffer size. 65535 is the hard limit.
Syntax: Integer number
Apply: Restart required.
Tips: [Performance] A bigger receiving buffer will increase performance when processing requests with big request body (e.g. to upload a big file).
Max Request URL LengthGo to top
Description: Specifies the maximum size of a request URL. URL is an address used to access one web page, including query string. 8192 bytes is the hard limit.
Syntax: Integer number
Apply: On the fly with reload.
Tips: [Security & Performance] Set it low and reasonable to reduce memory usage and help identify bad request and DoS attack.
2-3K is big enough for most web sites unless HTTP GET is used as big query string instead of POST.
Max Request Header SizeGo to top
Description: Specifies the maximum size of a HTTP request header including request URL. Hard limit is 16380 bytes.
Syntax: Integer number
Apply: On the fly with reload.
Tips: [Security & Performance] Set it low and reasonable to reduce memory usage and help identify bad request and DoS attack.
4-8K is big enough for most web sites.
Max Request Body SizeGo to top
Description: Specifies the maximum size of a HTTP request body. 1GB is the hard limit.
Syntax: Integer number
Apply: On the fly with reload.
Tips: [Security] Set the limit just a little higher than what is really needed to help identify DoS attack. Your swapping space should be big enough.
Max Dynamic Response Header SizeGo to top
Description: Specifies the maximum header size of a dynamically generated response. Hard limit is 8KB
Syntax: Integer number
Apply: On the fly with reload.
Tips: [Reliability & Performance] Set it low and reasonable to help recognize bad responses that are dynamically generated by external applications.
Max Dynamic Response Body SizeGo to top
Description: Specifies the maximum body size of a dynamically generated response. Hard limit is 1GB.
Syntax: Integer number
Apply: On the fly with reload.
Tips: [Reliability & Performance] set the limit low and reasonable to help identify bad responses. For e.g., it is pretty often to find a bad script with dead loop which will generate infinite response.
Enable CompressionGo to top
Description: Controls GZIP compression for both static and dynamic HTTP response.
Syntax: Select from radio box
Apply: On the fly with reload.
Tips: [Performance] Enable it to save network bandwidth.
Enable Dynamic CompressionGo to top
Description: Controls GZIP compression for dynamically generated HTTP response. Enable Compression must be set to "true" in order to enable dynamic GZIP compression.
Syntax: Select from radio box
Apply: On the fly with reload.
Tips: [Performance] Compressing dynamic responses increases CPU and memory utilization but saves network bandwidth.
Compression Level (Dynamic Content)Go to top
Description: Specifies the level of compression for dynamic contents, ranges from 1 (lowest) to 9 (highest), default is 2.
Syntax: Number between 1 and 9.
Apply: On the fly with reload.
Tips: [Performance] Higher compression level will use more memory and CPU cycles. You can set it to a higher level if your machine has additional power.
Compressible TypesGo to top
Description: Specifies what MIME types are allowed to be compressed. For example, you may want to compress text/* but not text/css, you can have a rule like text/*, !text/css. "!" will exclude that mime type.
Syntax: MIME type list separated by commas. allow wild card "*" and negate sign "!". Examples: text/*, !text/js.
Apply: On the fly with reload.
Tips: [Performance] Only allow types that will benefit from compression.
Auto Update Static FileGo to top
Description: Specifies whether to let the web server to create/update GZIP compressed edition of compressible static files. If set to "Yes", when a file with MIME type listed in "Compressible Type" is requested, the web server will create or update the corresponding compressed file if it does not exist or outdated. The compressed file is created under the same directory with original file name plus the trailing suffix ".gz". Please make sure the directory is writeable by the user that the web server running as.
Syntax: Select from radio box
Apply: On the fly with reload.
Tips: [Performance] It is recommended to create the initial compressed files manually for a large site with tons of static files.
Compression Level (Static Content)Go to top
Description: Specifies the level of compression for static contents, ranges from 1 (lowest) to 9 (highest), default is 6.
Syntax: Number between 1 and 9.
Apply: On the fly with reload.
Max Static File SizeGo to top
Description: Specifies the maximum size of a static file for which the web server will create a compressed file automatically.
Syntax: Number in bytes not less than 1K
Apply: On the fly with reload.
Tips: [Performance] It is not recommended to have web server create/update compressed file for large files, as the whole web service is blocked during that period, no request can be processed before the compression is done.
Min Static File SizeGo to top
Description: Specifies the minimum size of a static file for which the web server will create a corresponding compressed file.
Syntax: Number in bytes not less than 200
Apply: On the fly with reload.
Tips: It is not necessory to compress very small file, as the save in bandwidth is negligible.