Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

K60520554: Caches | BIG-IP TMOS operations guide

https://my.f5.com/manage/s/article/K60520554
Published Date: Oct 09, 2018 UTC Updated Date: Feb 15, 2023 UTC

Applies to

BIG-IP AAM : [15.1.8, 15.1.7, 15.1.6, 15.1.5, 15.1.4, 15.1.3, 15.1.2, 15.1.1, 15.1.0, 15.1.X, 15.0.1, 15.0.0, 15.0.X, 15.X.X,
14.1.5, 14.1.4, 14.1.3, 14.1.2, 14.1.0, 14.1.X, 14.0.1, 14.0.0, 14.0.X, 14.X.X, 13.1.5, 13.1.4, 13.1.3, 13.1.1, 13.1.0, 13.1.X,
13.0.1, 13.0.0, 13.0.X, 13.X.X, 12.1.6, 12.1.5, 12.1.4, 12.1.3, 12.1.2, 12.1.1, 12.1.0, 12.1.X, 12.0.0, 12.0.X, 12.X.X, 11.6.5,
11.6.4, 11.6.3, 11.6.2, 11.6.1, 11.6.0, 11.6.X, 11.5.10, 11.5.9, 11.5.8, 11.5.7, 11.5.6, 11.5.5, 11.5.4, 11.5.3, 11.5.2, 11.5.1,
11.5.0, 11.5.X]

BIG-IP DNS : [17.0.0, 17.0.X, 17.X.X, 16.1.3, 16.1.2, 16.1.1, 16.1.0, 16.1.X, 16.0.1, 16.0.0, 16.0.X, 16.X.X, 15.1.8, 15.1.7,
15.1.6, 15.1.5, 15.1.4, 15.1.3, 15.1.2, 15.1.1, 15.1.0, 15.1.X, 15.0.1, 15.0.0, 15.0.X, 15.X.X, 14.1.5, 14.1.4, 14.1.3, 14.1.2,
14.1.0, 14.1.X, 14.0.1, 14.0.0, 14.0.X, 14.X.X, 13.1.5, 13.1.4, 13.1.3, 13.1.1, 13.1.0, 13.1.X, 13.0.1, 13.0.0, 13.0.X, 13.X.X,
12.1.6, 12.1.5, 12.1.4, 12.1.3, 12.1.2, 12.1.1, 12.1.0, 12.1.X, 12.0.0, 12.0.X, 12.X.X]

Chapter 15: Caches

Table of contents | << Previous chapter | Next chapter >>

Contents

Chapter sections

At a glance–Recommendations
Background
BIG-IP cache feature
BIG-IP DNS cache feature
Procedures
Displaying cache setting entries at the command line
Displaying the Cache Setting entries for a particular profile at the command line
Displaying the Cache Setting entries for the web-acceleration profile at the command line
Determining the percentage of memory used by each TMM process at the command line
Viewing DNS cache statistics using tmsh
Displaying statistics for each transparent cache using tmsh
Viewing DNS cache records using tmsh
Managing transparent cache size
Modifying cache statistics using the Configuration utility
Invalidating cached content
BIG-IP Application Accelerator Manager End-of-Life (EoL) addendum (11.x - 15.x)
BIG-IP AAM optimization cache feature
Using the BIG-IP AAM dashboard utility
Enabling X-WA-Info headers for testing or troubleshooting

At a glance–Recommendations
F5 has identified the following cache recommendations:

Let cache objects time out and expire without intervention.


Manage and maintain the contents that are stored in cache.
View cache utilization on a weekly basis if memory and disk utilization is higher than normal.
Determine DNS cache performance and statistics.
Invalidate cached content for an application and node when updating content every hour or every day.
Manage BIG-IP AAM caching behavior by examining the X-WA-info debug headers and the BIG-IP AAM
dashboard.

Background

This section provides context for our recommended procedures in the form of overviews and supplemental information.

BIG-IP cache feature

The BIG-IP Cache Setting feature, formerly known as RAM Cache, uses the information from the Vary header to cache
responses from the origin web server (OWS). OWS can include information within the Vary header to determine which
resource the server returns in its response.

For example, if a page is optimized for a particular web browser, OWS response may return the Vary: User-Agent HTTP
header. The proxy server then uses this information to determine whether to return a cached copy of the response to
subsequent requests, or to query the OWS for the resource again (a subsequent client request containing a different
User-Agent value forces the proxy to query the OWS for the resource again).

An HTTP cache is a collection of HTTP objects stored in the BIG-IP system memory which subsequent connections can
reuse to reduce traffic load on the origin web servers. The goal of caching is to reduce the need to send frequent
requests for the same object, and eliminate the need to send full responses in many cases. You can enable HTTP
caching on the BIG-IP system by associating a Web Acceleration profile with a virtual server.

Note: Web Accelerator is not supported in BIG-IP 11.4 and later.

Cacheable content

The BIG-IP cache feature complies with the cache specifications described in RFC 2616. You can configure the BIG-IP
system to cache the following content types:

200, 203, 206, 300, 301, and 410 HTTP responses.


Responses to HTTP GET requests.
Other HTTP methods for uniform resource identifiers (URIs) specified for inclusion in cached content, or specified
in iRules.
Content based on the User-Agent and Accept-Encoding values. The cache feature holds different content for
Vary headers.

The default cache configuration caches only responses to HTTP GET requests. However, you can configure the Web
Acceleration profile to cache other requests, including non-HTTP requests. To do this, you can specify a URI in the URI
Include or Pin List within an HTTP profile, or write an iRule.

Non-cacheable content

The cache feature does not cache the following items:

Private data specified by cache control headers.


Action-oriented HTTP methods such as HEAD, PUT, DELETE, TRACE, and CONNECT.
Set-Cookie headers sent by the origin web server.
BIG-IP DNS cache feature

You can configure a transparent cache on the BIG-IP system to use external DNS resolvers to resolve queries and then
cache the responses from the resolvers. The next time the system receives a query for a response that exists in the
cache, the system immediately returns the response from the cache. The transparent cache contains messages and
resource records.

A transparent cache in the BIG-IP system consolidates content that would otherwise be cached across multiple external
resolvers. When a consolidated cache is in front of external resolvers (each with their own cache), it can produce a much
higher cache hit percentage.

Note: DNSSEC information is not cached since the traffic is encrypted.

Procedures

This section details how to complete the following cache-related tasks:

Displaying cache setting entries at the command line

You can display the contents of the Cache Setting feature with the command line using the tmsh ramcache command.
The ramcache command includes a number of other options that you can use to display only those Cache Setting
entries corresponding to specific uniform resource identifiers (URIs), URI branches, or hosts.

For more information about using tmsh to manipulate cache setting entries, refer to tmsh Help command for the module
and specific components that reside within that module.

Displaying the Cache Setting entries for a particular profile at the command line

1. Log in to tmsh by entering the following command:

tmsh

2. Enter the following command syntax:

show ltm profile ramcache <profilename>

All of the HTTP cache entries on the BIG-IP system displays.

Displaying the Cache Setting entries for the web-acceleration profile at the command line

1. Log in to tmsh by entering the following command:

tmsh

2. Enter the following command syntax:

show ltm profile web-acceleration <profilename>

Determining the percentage of memory used by each TMM process at the command line

Enter the following command:

tmsh show /sys memory


Viewing DNS cache statistics using tmsh

show ltm dns cache <cache-type>

1. Log in to tmsh by entering the following command:

tmsh

2. Enter the following command:

show ltm dns cache

Statistics for all of the DNS caches on the BIG-IP system display.

3. Enter the following command syntax:

Displaying statistics for each transparent cache using tmsh

1. Log in to tmsh by entering the following command:

tmsh

2. Enter the following command syntax:

show ltm dns cache <cache type> <cache name>

For example:

show ltm dns cache transparent test

Statistics for the transparent cache on the system named test display.

Viewing DNS cache records using tmsh

1. Log in to tmsh by entering the following command:

tmsh

2. Enter the following command syntax:

show ltm dns cache <cache type> <cache name>

For example:

show ltm dns cache transparent test

Managing transparent cache size

To determines the amount memory a BIG-IP system has installed and how much of that memory to commit to DNS
caching, you can view the statistics for a cache to determine how well the cache is working. You can also change the
size of a DNS cache to fix cache performance issues.
Modifying cache statistics using the Configuration utility

1. Go to DNS > Caches > Cache List.


2. Select the name of the cache you want to modify.
3. In Message Cache Size, enter the maximum size in bytes for the DNS message cache.

The BIG-IP system caches the messages in a DNS response in the message cache. A larger maximum size
makes it possible for more DNS responses to be cached and increases the cache hit percentage. A smaller
maximum size forces earlier eviction of cached content, but can reduce the cache hit percentage.

4. In Resource Record Cache Size, enter the maximum size in bytes for the DNS resource record cache.

The BIG-IP system caches the supporting records in a DNS response in the Resource Record cache. A larger
maximum size makes it possible for more DNS responses to be cached and increases the cache-hit percentage.
A smaller maximum size forces earlier eviction of cached content, but can reduce the cache hit percentage.

Note: The message caches size include all TMMs on the BIG-IP system. If there are eight TMMs, multiply the size by
eight and put that value in this box.

Invalidating cached content

Cache invalidation is a powerful tool that you can use to maintain tight coherence between the content on your origin
web servers and the content that the BIG-IP system caches.

If you update content for your site at regular intervals, such as every day or every hour, you can use lifetime rules to
ensure that the system’s cache is refreshed with the same frequency.

Invalidation rules allow you to “expire” cached content before it has reached its time to live (TTL) value. Invalidation rules
are good to use when content updates are event-driven, such as when an item is added to a shopping cart, a request
contains a new auction bid, or a poster has submitted content on a forum thread.

Note: Invalidating the cached content on the BIG-IP system temporarily increases traffic to the origin web servers until
the BIG-IP module repopulates the cache.

For information on invalidating cached content, refer to the Invalidating Cached Content chapter in the BIG-IP
Acceleration: Implementations manual.

Note: For information about how to locate F5 product manuals, refer to K98133564: Tips for searching AskF5 and
finding product documentation.

BIG-IP Application Accelerator Manager End-of-Life (EoL) addendum (11.x - 15.x)

Note: Starting in BIG-IP 16.0.0, BIG-IP AAM reaches EoL. For more information, refer to K70113407: End of Software
Development for BIG-IP AAM.

BIG-IP AAM optimization cache feature

BIG-IP AAM optimization cache is a self-managing feature. A small amount of TMM memory is used together with a
disk-based datastor /metastore database. The two ways to view BIG-IP AAM caching behavior are by using X-WA-Info
debug headers and through the dashboard in the Configuration utility.

Using the BIG-IP AAM dashboard utility

The dashboard default reporting page summarize information about the memory, performance, throughput, and cache
behavior of BIG-IP AAM. These include the following:

Web Optimized
Transactions Web Image
Optimization Optimized
Web Throughput Web
Cache Effectiveness
Web Cache Invalidations
Memory Usage

Web optimized transactions

This page displays performance metrics for cached transactions in tabbed views, including From cache, Proxied, and
Errors. A combined view is also available.

From cache shows cached transactions per second against time, collected in increments of 5 minutes, 3 hours, 24
hours, 1 week, or 1 month. You can point to the line in the graph to display a specific time and number of cached
transactions per second. If configuration changes were made, a red circle appears in the graph, which you can select to
view additional details.

Optimized Web Throughput

This page displays selectable throughput metrics in tabbed views, including From cache and Proxied. A combined view
is also available.

From cache shows cached bytes per second against time, collected in increments of 5 minutes, 3 hours, 24 hours, 1
week, or 1 month. You can point to the line in the graph to display a specific time and number of cached bytes per
second. If configuration changes were made, a red circle appears in the graph, which you can select to view additional
details.

Web Cache Effectiveness

This page displays selectable cache metrics in tabbed view, including Entries, Bytes, and Evictions. A combined view
is also available.

Entries shows the number of cached entries against time, collected in increments of 5 Minutes, 3 Hours, 24
Hours, 1 Week, or 1 Month. You can point to the line in the graph to display a specific time and number of
cached entries. If configuration changes were made, a red circle appears in the graph, which you can select to
view additional details.
Bytes shows the total size of cached entries (in bytes) against time, collected in increments of 5 Minutes, 3
Hours, 24 Hours, 1 Week, or 1 Month. You can point to the line in the graph to display a specific time and total
size of entries in bytes. If configuration changes were made, a red circle appears in the graph, which you can
select to view additional details.
Evictions shows the number of cached evictions against time, collected in increments of 5 Minutes, 3 Hours, 24
Hours, 1 Week, or 1 Month. You can point to the line in the graph to display a specific time and number of
evictions. If configuration changes were made, a red circle appears in the graph, which you can select to view
additional details.

Web Image Optimization

This page displays selectable image metrics in tabbed view, including Current Reduced, Total Reduced, Current
Savings, Total Saving, Average Size, and Images Optimized. A combined view is also available.

Web Cache Invalidations

This page displays selectable invalidations metrics in a tabbed view, including Triggered Sourced, Triggered Received
, ESI Sourced, and ESI Received. A combined view is also available.
To easily check for an Invalidation trigger, set the time period to 3 Hours and watch the far right of the page for a small
peak to appear. Wait a few moments, then switch the time period to 5 Minutes. The page takes time collecting and
adjusting the display of the data over the entire page time axis.

Enabling X-WA-Info headers for testing or troubleshooting

WA-Info HTTP headers are headers that are optionally inserted into responses to the client by the BIG-IP AAM system to
provide information on how the response was processed. This facility and the Dashboard provide the only facilities to
track the behavior of BIG-IP AAM web optimization cache.

Note: The X-WA-Info headers feature should only be active in testing or troubleshooting and usually will be requested by
F5 Technical Support. It should not be left on in a production environment as there is an associated processing overhead
providing this information in every transaction in the network traffic.

For more information, refer to K13346: The BIG-IP WebAccelerator X-PvInfo header is renamed the X-WA-Info
header.

BIG-IP TMOS operations guide

Chapter 1: Guide introduction and contents


Chapter 2: Quick Start Guides
Chapter 3: F5 iHealth
Chapter 4: Operating Environment
Chapter 5: Hardware Diagnostics
Chapter 6: VIPRION
Chapter 7: Drive Maintenance
Chapter 8: Licenses and Entitlement
Chapter 9: Backup and Data Recovery
Chapter 10: Software Updates
Chapter 11: Networking and Cluster Health
Chapter 12: Log Files and Alerts
Chapter 13: Modules
Chapter 14: MySQL
Chapter 16: External APIs
Chapter 17: Security
Appendix A: Outside the Box
Appendix B: Deployment and Response Methodologies
Appendix C: Support Incident Report

Related Content
About operations guides
Optimizing the support experience
K4903: Overview of the Web Acceleration profile
K20393414: Using the tmsh Help feature
K13255: Displaying and deleting Cache Setting entries at the command line (11.x - 13.x)
The DNS Cache: Implementations chapter in the BIG-IP LTM Guide manual
K13322: Overview of BIG-IP MIB files
K13878: The ‘ramcache.maxmemorypercent’ variable controls memory allocation for the BIG-IP Cache
Setting feature (11.x - 15.x)
K5157: BIG-IP LTM Cache Setting feature and HTTP Vary header functionality

Note: For information about how to locate F5 product manuals, refer to K98133564: Tips for searching AskF5 and
Note: For information about how to locate F5 product manuals, refer to K98133564: Tips for searching AskF5 and
finding product documentation.

You might also like