
11
FLASH
MEDIA
SERVER
4.5
CONFIGURATION
AND
ADMINISTRATION
Deploying the server
Last updated 11/28/2012
4
Restart the server.
More Help topics
“
Adaptors and virtual hosts
” on page 14
Set up caching on edge servers
Streams that are played via an edge server can optionally be cached on that edge server’s hard drive to avoid extra
network traffic back to the origin. Edge servers manage their disk caches automatically using a least-recently-used
(LRU) scheme.
Edge servers group the cached files on disk into buckets; the files within each bucket are not ordered, but the buckets
themselves are ordered by LRU. When an edge server needs to free up disk space, it deletes the entire contents of the
least-recently-used buckets. When a file is added, it gets put in the "newest" bucket, and likewise when an existing file
is accessed, it is moved to the newest bucket. This maintains the LRU ordering.
A disk cache is divided up into N buckets, but since all newly accessed content goes into the newest bucket, only the
newest bucket actually grows in size. Once that bucket reaches K/N bytes, where K is the maximum size of the disk
cache, the server triggers a rollover. A rollover means the server deletes the oldest bucket, and creates a new bucket
where new content will go.
For example:
1
Start with an empty disk cache, configured to have 8 buckets and max size of 80 GB.
2
All content goes into bucket "00" until it grows to 10 GB.
3
New bucket "01" is created. All content now goes into this bucket. In addition, content accessed from bucket "00"
may be moved to bucket "01".
4
When bucket "01" reaches 10 GB, the server creates bucket "02", and so on.
5
Repeat until there are 8 buckets, "00" through "07".
6
When bucket "07" reaches 10 GB, the server creates bucket "08", and also deletes bucket "00" and all the content it
contains.
The deletion is only triggered by the size of the "new" bucket, not the total size of the disk. Because content can be
moved from one of the older buckets into the newest bucket, the older buckets do not remain at their maximum size
of N/K bytes, and thus the total size of the disk will be less than its max K when the server starts deleting old buckets.
You set up caching on an edge server in the
CacheDir
element of the Vhost.xml file. The following table describes the
subelements that you use to set up caching: