volume.config

The volume.config file enables you to manage your cache space more efficiently and restrict disk usage by creating cache volumes of different sizes. By distributing the cache across multiple volumes, you can help decrease single-lock pressure when there are not many hard drives present. You can further configure these volumes to store data from certain origin servers and/or domains in the hosting.config file.

フォーマット

作成したいボリュームごとに、下記のフォーマットで一行追加してください。

volume=volume_number  scheme=protocol_type  size=volume_size

volume_number は 1 から 255 (ボリュームの最大数は 255 )の間の数であり、 protocol_typehttp です。 Traffic Server は HTTP ボリュームタイプとして http をサポートします。 volume_size はボリュームに割り当てられるキャッシュスペースの量です。この値はキャッシュスペースの合計のパーセンテージもしくは絶対値が指定できます。絶対値は 128MB の倍数でなければならず、 128MB は最小値です。パーセンテージで指定する場合、サイズは最も近い 128MB の倍数に切り捨てられます。

各ボリュームは並列に I/O を発行するため幾つかのディスクにまたがって分散されます。例えば、四つのディスクがある場合、 1-GB ボリュームは(各ディスクに十分な使用可能な空き領域があると仮定して)各ディスクで 256MB 持つでしょう。キャッシュの全ディスクスペースを割り当てない場合、余ったディスクスペースは使用されません。余ったスペースは後で既存ボリュームの削除やクリア無しに新しいボリュームを作成するのに使用出来ます。

重要

Changing this file to add, remove or modify volumes effectively invalidates the cache.

Optional ramcache setting

You can also add an option ramcache=true/false to the volume configuration line. True is the default setting and so not needed unless you want to explicitly set it. Setting ramcache=false will disable the ramcache that normally sits in front of a volume. This may be desirable if you are using something like ramdisks, to avoid wasting RAM and cpu time on double caching objects.

Exclusive spans and volume sizes

In the following sample configuration 2 spans /dev/disk1 and /dev/disk2 are defined in storage.config, where span /dev/disk2 is assigned to volume 3 exclusively (volume 3 is forced to an "exclusive" span /dev/disk2). In volume.config there are 3 volumes defined, where volume 1 and volume 2 occupy span /dev/disk1 taking each 50% of its space and volume 3 takes 100% of span /dev/disk2 exclusively.

storage.config:

/dev/disk1
/dev/disk2 volume=3 # <- exclusive span

volume.config:

volume=1 scheme=http size=50%
volume=2 scheme=http size=50%
volume=3 scheme=http size=512 # <- volume forced to a specific exclusive span

It is important to note that when percentages are used to specify volume sizes and "exclusive" spans are assigned (forced) to a particular volume (in this case volume 3), the "exclusive" spans (in this case /dev/disk2) are excluded from the total cache space when the "non-forced" volumes sizes are calculated (in this case volume 1 and volume 2).

The following example partitions the cache across 5 volumes to decreasing single-lock pressure for a machine with few drives. The last volume being an example of one that might be composed of purely ramdisks so that the ramcache has been disabled.:

volume=1 scheme=http size=20%
volume=2 scheme=http size=20%
volume=3 scheme=http size=20%
volume=4 scheme=http size=20%
volume=5 scheme=http size=20% ramcache=false