You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2013/09/05 21:14:13 UTC
git commit: TS-350 Add documentation for the new RAM cache options
Updated Branches:
refs/heads/master 03b88fca6 -> 6648a786f
TS-350 Add documentation for the new RAM cache options
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/6648a786
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/6648a786
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/6648a786
Branch: refs/heads/master
Commit: 6648a786f8d370f0d682be71545d9dcb64187dca
Parents: 03b88fc
Author: Leif Hedstrom <zw...@apache.org>
Authored: Thu Sep 5 13:14:04 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Thu Sep 5 13:14:04 2013 -0600
----------------------------------------------------------------------
doc/admin/configuring-cache.en.rst | 22 +++++++++++
.../configuration/records.config.en.rst | 39 +++++++++++++++++++-
2 files changed, 59 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6648a786/doc/admin/configuring-cache.en.rst
----------------------------------------------------------------------
diff --git a/doc/admin/configuring-cache.en.rst b/doc/admin/configuring-cache.en.rst
index 8b147cc..8eed8c7 100644
--- a/doc/admin/configuring-cache.en.rst
+++ b/doc/admin/configuring-cache.en.rst
@@ -65,6 +65,28 @@ and reduces load on disks, especially during temporary traffic peaks.
You can configure the RAM cache size to suit your needs, as described in
:ref:`changing-the-size-of-the-ram-cache` below.
+The RAM cache supports two cache eviction algorithms, a regular **LRU**
+(``Least Recently Used``) and the more advanced **CLFUS** (``Clocked Least
+Frequently Used by Size``). The default is to use **CLFUS**, and this is
+controlled via :ts:cv:`proxy.config.cache.ram_cache.algorithm`.
+
+Both the **LRU** and **CLFUS** RAM caches support a configuration to increase
+scan resistance. In a typical **LRU**, if you request all possible objects in
+sequence, you will effectively churn the cache on every request. The option
+:ts:cv:`proxy.config.cache.ram_cache.use_seen_filter` can be set to add some
+resistance against this problem.
+
+In addition, **CLFUS** also supports compressing in the RAM cache itself.
+This can be useful for content which is not compressed by itself (e.g.
+images). This should not be confused with ``Content-Encoding: gzip``, this
+feature is only thereto save space internally in the RAM cache itself. As
+such, it is completely transparent to the User-Agent. The RAM cache
+compression is enabled with the option
+:ts:cv:`proxy.config.cache.ram_cache.compress`. The default is 0, which means
+no compression. Other possible values are 1 for **fastlz**, 2 for **libz** and
+3 for **liblzma**.
+
+
.. _changing-the-size-of-the-ram-cache:
Changing the Size of the RAM Cache
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6648a786/doc/reference/configuration/records.config.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/configuration/records.config.en.rst b/doc/reference/configuration/records.config.en.rst
index 74867dd..f546187 100644
--- a/doc/reference/configuration/records.config.en.rst
+++ b/doc/reference/configuration/records.config.en.rst
@@ -1037,8 +1037,43 @@ RAM Cache
.. :ts:cv:: CONFIG proxy.config.cache.ram_cache.size INT -1
- By default the RAM cache size to is automatically determined, based on cache size (approximately 10 MB of RAM cache per GB of disk cache).
- Alternatively, it can be set to a fixed value such as 21474836480 (20GB).
+ By default the RAM cache size is automatically determined, based on
+ disk cache size; approximately 10 MB of RAM cache per GB of disk cache.
+ Alternatively, it can be set to a fixed value such as
+ **20GB** (21474836480)
+
+.. :ts:cv:: CONFIG proxy.config.cache.ram_cache.algorithm INT 0
+
+ Two distinct RAM caches are supported, the default (0) being the **CLFUS**
+ (``Clocked Least Frequently Used by Size``). As an alternative, a simpler
+ **LRU** (``Least Recently Used``) cache is also available, by changing this
+ configuration to 1.
+
+.. :ts:cv:: CONFIG proxy.config.cache.ram_cache.use_seen_filter INT 0
+
+ Enabling this option will filter inserts into the RAM cache to ensure that
+ they have been seen at least once. For the **LRU**, this provides scan
+ resistance. Note that **CLFUS** already requires that a document have history
+ before it is inserted, so for **CLFUS**, setting this option means that a
+ document must be seen three times before it is added to the RAM cache.
+
+.. :ts:cv:: CONFIG proxy.config.cache.ram_cache.compress INT 0
+
+ The **CLFUS** RAM cache also supports an optional in-memory compression.
+ This is not to be confused with ``Content-Encoding: gzip`` compression.
+ The RAM cache compression is intended to try to save space in the RAM,
+ and is not visible to the User-Agent (client).
+
+ Possible values are:
+
+ - ``0`` = no compression
+ - ``1`` = fastlz (extremely fast, relatively low compression)
+ - ``2`` = libz (moderate speed, reasonable compression)
+ - ``3`` = liblzma (very slow, high compression)
+
+ NOTE: compression runs on task threads. To use more cores for
+ RAM cache compression, increase :ts:cv:`proxy.config.task_threads`.
+
Heuristic Expiration
====================