
60
Chapter 8
Configuring the cache
Creating cache partitions for specific protocols
You can create separate partitions for your cache that vary in size to store content according to protocol. This
configuration ensures that a certain amount of disk space is always available for a particular protocol.
To partition the cache according to protocol:
1. Telnet into the HP web cache appliance and select Shell Access as described in
Overview of Access
Methods‚ on page 7
.
2. Run the
stop_traffic_server
command.
3. Open the
partition.config
file located in Traffic Server’s
config
directory with Vi.
4. For each partition you want to create, enter a line with the following format:
partition=partition_number
scheme=protocol_type
size=partition_size
where:
partition_number
is a number between 1 and 255 (the maximum number of partitions is 255).
protocol_type
is
http
(all HTTP, FTP, and NNTP content is stored in the
http
partition).
partition_size
is the amount of cache space allocated to the partition. This value can be either a
percentage of the total cache space or an absolute value. The absolute value must be a multiple of 128 MB,
where 128 MB is the smallest value. If you specify a percentage, the size is rounded down to the closest
multiple of 128 MB. Each partition is striped across several disks to achieve parallel I/O. For example, if
there are 4 disks, a 1 GB partition will have 256 MB on each disk (assuming each disk has enough free
space available).
5. Save and close the
partition.config
file.
6. Restart Traffic Server with the
start_traffic_server
command
.
Making changes to partition sizes and protocols
After you have configured your cache partitions based on protocol, you can make changes to the configuration
at any time. Before making changes, note the following:
•
You must stop Traffic Server before you change the cache partition size and protocol assignment.
•
When you increase the size of a partition, the contents of the partition are not deleted However, when you
reduce the size of a partition, the contents of the partition are deleted.
•
When you change the partition number, the partition is deleted and then recreated even if the size and
protocol type remain the same.
•
A lot of changes to the partition sizes may result in disk fragmentation, which affects performance and hit
rate. Hewlett Packard recommends that you clear the cache (refer to
Clearing the cache‚ on page 62
)
before making many changes to cache partition sizes.
NOTE
If you do not allocate all the disk space in the cache, the extra disk space is not used.
You can use the extra space at a later time to create new partitions without deleting
and clearing the existing partitions.