Using AFPA directives: IBM HTTP Server
System Administration IBM HTTP Server documentation
Pertains to Windows NT users Pertains to windows 2000 users

Using AFPA directives

This section provides information on AFPA directives. These AFPA directives control the Fast Response Cache Accelerator, also referred to as the Cache Accelerator. The information includes specific directive syntax, scopes, defaults and associated notes Notes. Links to related topics appear at the end of this section.

AfpaAdvancedTuning

  • Description: Provides parameters for performance tuning.
  • Default: None
  • Module: Non-applicable
  • Multiple instances in the configuration file: No
  • Scope: One per physical Apache server
  • Syntax: AfpaAdvancedTuning tuning_string
  • Values: The AfpaAdvancedTuning directive has advanced tuning parameters that require an extensive understanding of Web server performance issues. Using these switches incorrectly can lead to system instability and poor performance. Consider the aggressive default settings as the optimal settings for the most demanding scenarios.

Listing of switches and defaults

A table follows with brief switch descriptions and their defaults:

Switch Description Default
/bufs Number of logging buffers, each log buffer is 65536. The AFPA function writes all log buffers every 5 seconds. 285

/size Maximum cached file size. 92160

/conns Number of connection endpoints. 6500

/ttl Time in seconds that the switches keep items hot. 180 seconds

/threads Number of worker threads per CPU. 3

/active Maximum worker threads active per CPU. 10

Detailing switch descriptions

A more lengthy description of switches and their settings follows:

The /bufs switch specifies the number of logging buffers used by AFPA, for access logging. The buffers store access logs until the AFPA function writes these logs to disk. AFPA writes all log buffers to disk every 5 seconds. The higher the throughput, the more memory required to store log entries. The number of buffers required roughly equals (tps*ls*5)/65536, where:

  • tps indicates the expected transactions per second
  • Ls indicates the typical size data necessary to log the transaction.
  • Assuming log entries less than, or equal to 256 bytes and 285 logging buffers, the default, AFPA could process 14592 transactions per second, without requiring more log buffers.
  • The /size switch specifies the maximum file size AFPA keeps in its primary cache. Files larger than this size cache in the AFPA secondary cache. The pinned memory backs up the primary cache.
  • The /conns switch specifies the number of preallocated sockets used by AFPA. AFPA preallocates sockets for performance reasons. Choose the number of preallocated sockets to approximate the expected transactions per second.
  • The /ttl switch specifies in seconds the maximum lifetime of a file in the AFPA primary cache. When this time elapses, the AFPA function removes the file from the AFPA primary cache. Setting this value to zero prevents AFPA from aging files from the primary cache.
  • The /threads switch specifies the number of worker threads used by AFPA to process requests.
  • The /active switch specifies the number of worker threads concurrently active and not blocked on I/O.

Using optimal settings for typical 1-, 2-, and 4-way machines

Examples of optimized settings for typical 1-way, 2-way, and 4-way machines follows:

  • 1-way: AfpaAdvanced Tuning "/bufs 68 /size 75000 /conn 8000"
  • 2-way: AfpaAdvancedTuning "/bufs 93 /size 75000 /conn 10000"
  • 4-way: AfpaAdvancedTuning "/bufs 123 /size 65000 /conn 12000"

AfpaCache

  • Description: Turns the Fast Response Cache Accelerator on or off for a particular scope, such as a directory.
  • Default: None
  • Module: Non-applicable
  • Multiple instances in the configuration file: Yes
  • Scope: Server configuration, virtual host, directory, per-directory configuration file
  • Syntax: AfpaCache On
  • Values: On or off

This directive applies to all descendants in a scope, unless otherwise modified by another directive.

AfpaEnable

  • Description: Enables the Fast Response Cache Accelerator.
  • Default: Fast Response Cache Accelerator disabled
  • Module: Non-applicable
  • Multiple instances in the configuration file: No
  • Scope: One per physical Apache server
  • Syntax: AfpaEnable disabled
  • Values: disabled or enabled

If this directive is present, the Cache Accelerator listens on either the TCP port specified by the Port directive, or the default port (80). The Cache Accelerator listens on the ports of all active TCP/IP adapters on the server. When the port binds to a particular TCP/IP adapter, the Cache Accelerator disables.

AfpaLogFile

  • Description: Defines the Cache Accelerator log file name, location, and logging format.
  • Default: /tmp/afpa.log
  • Module: Non-applicable
  • Multiple instances in the configuration file: No
  • Scope: One entry per physical Apache server
  • Values: file_path_and_name log_format

    where you can represent log_format as either:

    • CLF = Common Log Format
    • ECLF = Extended Common Log Format
    • V-CLF = Common Log Format with virtual host information
    • V-ECLF = Extended Common Log Format with virtual host information

This directive defaults to Cache Accelerator logging disabled, when the AfpaLogFile directive is not present. The log file uses the current date as the file type. The log file automatically rolls over at midnight, each day.

AfpaPort

  • Description: Defines the TCP port on which the Fast Response Cache Accelerator listens.
  • Default: None
  • Module: Non-applicable
  • Multiple instances in the configuration file: No
  • Scope: One per physical Apache server
  • Syntax: AfpaPort [port value]
  • Values: 1 - 65535

This directive must be present. The Cache Accelerator listens on this port for all active TCP/IP adapters on the server.

 
Finding related information

     (Back to the top)