The AFPA directives control the Fast Response Cache Accelerator function.
The AfpaAdvancedTuning directive has advanced tuning parameters that requiere an advanced understanding of web server performance issues.
Using these switches incorrectly could lead to system instability (i.e. blue screens) and/or poor performance.
The default settings are considered the optimal settings for the most demanding scenarios.
The default settings are aggressive.
Brief description switches and their defaults:
/bufs - number of logging buffers (each log buf is 65536, all log buffers are written every 5 seconds), default = 285
/size - max cached file size, default = 92160
/conns - number of connection endpoints, default = 6500
/ttl - specify time in seconds items are kept hot, default = 180
/threads - Specify number of worker threads per CPU, default = 3
/active - Specify max worker threads active per CPU, default = 10
Long description of switches:
The "/bufs" switch specifies the number of logging buffers used by AFPA for access logging. The buffers are necessary to store access logs until they are written 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 # of buffers required is roughly equal to (tps*ls*5)/65536 where "tps" is the expected transactions per second and "ls" is the typical size data necessary to log the transaction. Assuming log entries are no more than 256 bytes and the number of logging buffers is 285 (the default), AFPA could process 14592 transactions per second without requiring more log buffers.
The "/size" switch specifies the maximum size of files AFPA will keep in it's primary cache. Files larger than this size will be cached in AFPA's secondary cache. The primary cache is backed by pinned memory. Pinned memory is limited. It's advantageous to reserve the primary cache for smaller files. This prevents large files from invalidating small files in the primary cache. This will occur if the value for this switch is too large.
The "/conns" switch specifies the number of pre-allocated sockets used AFPA. AFPA pre-allocates sockets for performance reasons. The number of pre-allocated sockets should be chosen to approximate the expected transactions per second.
The "/ttl" switch specifies in seconds the maximum lifetime (time to live) of a file in AFPA's primary cache. When this time is elapsed, the file is removed from AFPA's 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.
Example Optimized Settings for typical 1, 2, and 4 way machines
The AFPA directives control the Fast Response Cache Accelerator function.
AfpaBindLogger allows you to bind the Fast Response Cache logging thread in the kernel to a specific processor.
The format of the command is AfpaBindLogger [-1, 0, 1, ..., n], -1 will leave the logging thread unbound and a number
from 0 to total number of processors on the system will bind the logging thread to that processor.
NOTE: This command will only bind the kernel logging thread to a processor and not the Apache process.
Description - Turns Fast Response Cache Accelerator on or off
Scope - Server configuration, virtual host, directory, per-directory
configuration file
Syntax - on or off
Usage - AfpaCache on
Default - none
Override - Options
Multiple instances in the config file - Allowed
Notes
Valid on AIX and Windows NT.
The AFPA directives control the Fast Response Cache Accelerator function.
The AfpaCache directive turn the Fast Response Cache Accelerator on or off for a particular scope (such as a directory).
This directive applies to all descendants in a scope unless otherwise modified by another directive.
Description - Enables Fast Response Cache Accelerator
Scope - One per physical Apache server
Default - Fast Response Cache Accelerator disabled
Notes
Valid on AIX and Windows NT.
The AFPA directives control the Fast Response Cache Accelerator function.
The AfpaEnable directive is use to enable the Fast Response Cache Accelerator (Cache Accelerator).
If the directive is present the Cache Accelerator will listen on the TCP
port specified by the Port directive or the default port 80. The Cache Accelerator
will listen on to the port on all TCP/IP adapters that are active on the server. If the port
is specified to be bound to a particular TCP/IP adapter the Cache Accelerator will be disabled.
The AFPA directives control the Fast Response Cache Accelerator function.
AfpaRevalidationTimeout sets the time interval for a cached object to be revalidated.
Once an object is cached in the kernel after the time interval has expired, the kernel
will force the next request of the object to set up Apache server to be revalidated.
The time interval is expressed in seconds.