Tune web service performance

The default web service performance settings are tuned to recommended values. You can customize settings, such as the maximum number of client connections and how long to stay connecteded before timing out.

To tune website performance, edit /Library/Server/web/Config/apache2/httpd_server_app.conf. This Apache configuration file includes settings such as:

Setting

Description

MaxClients 1024

Enter the maximum number of simultaneous connections. The range is 1 to 1024 connections.

You can use a percentage of the maximum number of processes available instead of a hard value by following the value with a % character. For example:

MaxClients 50%

ServerLimit 1024

Enter the upper limit for the MaxClients setting. This is typically set to the same value as MaxClients.

You can use a percentage of the maximum number of processes available instead of a hard value by following the value with a % character. For example:

ServerLimit 50%

Timeout 300

Enter number of seconds before a connection to your webserver times out. Timeouts occur when a user is viewing web pages but not interacting with the site.

MinSpareServers 1

MaxSpareServers 10

Enter the minimum and maximum number of spare server processes. These settings regulate the creation of idle spare server processes. Keep in mind the following:

  • For minimum spareserver processes, if there are fewer than the required minimum spare server processes, the server adds spare server processes at a rate of one per second.

  • For maximum spareserver processes, if more than the maximum number of spare server processes are idle, the server stops adding spare server processes beyond the maximum limit.

StartServers 1

Enter the number of spare servers that get created at startup.

MaxKeepAliveRequests 100

Enter the maximum number of persistent connections to the server. The range is 1 to 2048 connections.

KeepAliveTimeout 15

Enter the amount of time that can pass between requests before the session is disconnected by the web server. The range for connection timeout is 0 to 9999 seconds.