FlexCache Volumes Improves performance
in your NFS environment, You can use FlexCache volumes to speed up access to
data, or to offload traffic from heavily accessed volumes. FlexCache volumes
help improve performance, especially when clients need to access the same data
repeatedly, because the data can be served directly without having to access
the source. Therefore, you can use FlexCache volumes to handle system workloads
that are read-intensive.
Reads
Caches are populated as a host reads data from the source. On the first
read of any data in below figure, the cache has to fetch the data from the
original source (2). The data is returned to the cache (3), stored in the cache,
and then passed back to the host (4). As reads are passed through a cache, the
cache fills up by storing the requested data.
Any subsequent accessing of data that is already stored
in the cache can be served
immediately back to the host (2) without spending time and resources
accessing the original source of the data. This is the primary advantage of a
cache—serving frequently accessed data directly to a host without having to
fetch the data from the original source. However, you may be thinking, “What if
the data changed on the origin system? Does the FlexCache system still serve
the data stored in its cache?” It is possible that the FlexCache system could
be storing data that has changed at the origin system—this is called stale data. However, although it is true that the FlexCache
system may store stale data, policies exist that allow you to control and
manage how the FlexCache system handles stale data. These policies are
discussed in “Cache Consistency.”
In a FlexCache system, all writes from a host (1 in Figure 3) are
passed directly through the cache volume to the origin volume (2). The origin
volume responds to the FlexCache volume when it assumes responsibility for the
new or changed data (3); only then does the FlexCache volume acknowledge the
result of the write to the host (4). This is called a write-through cache.
A write-through cache is a cache that does not respond to the host
until it receives a response from the next subsystem in the line. In other
words, the FlexCache cache volume does not respond to the host until the origin
volume acknowledges receipt of the data, thus helping to keep the data safe and
sound.
This is in contrast to a write-back cache, which responds to the host immediately before
verifying that the data can be successfully passed to the next subsystem. Once
a write-back cache accepts responsibility for data and responds to the host
before acknowledging receipt of the next subsystem, the write-back cache must
protect the data until it is written to physical media (i.e., disk). Data in
this state is called dirty data, and it must be protected from system failures
such as power loss (in such a way that when power is restored, the dirty data
is still accessible and ready to be stored on disk).
Cache Consistency
Three primary policies govern the freshness of data: (explaining
first 2 important ones)
1.
attribute cache time-outs,
2.
delegations
3.
write operation proxy.
ATTRIBUTE
CACHE TIME-OUTS
As data is retrieved from an origin volume
and stored in the cache volume, the file containing that data is considered
fresh for a specified amount of time, called the attribute cache time-out. In
other words, if a host requests data from a file in the cache volume and the
attribute cache time-out has not expired, the cache volume serves the data
directly to the host without having to communicate with the origin volume. If
the attribute cache time-out has expired, the cache volume checks with the
origin volume to compare the file’s attributes. If the attributes are the same
on the cache volume and the origin volume, the file is fresh, and the data is
served from the cache volume (and the attribute cache time-out restarts). If
the attributes are not the
same, the file is stale, is marked invalid,
and is reread from the origin volume before serving the host (also resetting
the attribute cache time-out).
DELEGATIONS
A delegation is another mechanism used to
manage cache consistency. A delegation is a contract between
the cache volume and the origin volume,
which says that if the cache volume is granted a delegation for a
specific file, the origin volume does not
change that file without first notifying the cache volume.
***This
means that the cache volume does not have to validate the file with the
origin volume, even if the attribute cache time-out has expired. In fact, if a
file has a delegation, the attribute cache time-out is ignored.
FlexCache FAQs
DOES FLEXCACHE SUPPORT FILE
LOCKING? (how it handles multiple WRITE requests)
Yes, for applications that use the NFS feature for file locking,
FlexCache uses a network lock manager (NLM) to pass locks through.
FlexCache Volumes
limitation?
FlexVol volumes features are not supported
on FlexCache volumes, such as Snapshot copy creation, deduplication,
compression, FlexClone volume creation, volume move, and volume copy.
How many FlexCache
volumes can be made on a storage system?
You can have a maximum of 100 FlexCache volumes on a storage
system.
WHAT CLIENT PROTOCOLS DOES FLEXCACHE
SUPPORT?
FlexCache supports serving hosts and clients that use NFS v2 and v3.
FlexCache does not support CIFS,
NFS v4, or any block based storage protocol (FC, iSCSI)
DOES FLEXCACHE SUPPORT ANY
NETWORK PROTOCOLS ,SUCH AS HTTP, FTP, OR NNTP?
No
WHAT IS THE PROTOCOL USED
BETWEEN A FLEXCACHE SYSTEM AND THE ORIGIN SYSTEM?
The protocol used between a FlexCache system and the origin system is a
NetApp proprietary protocol
referred to as NRV. NRV offers many advantages in terms of performance,
capability, and time to market for other features.NRV is high performing, very
NFSv4-like, and includes the use of delegations.
WHAT PORTS ARE REQUIRED?
FlexCache uses only port 2050 for all NRV communication between the cache
storage system and the origin
storage system. NRV works only on TCP, not UDP.
CAN I THROTTLE BANDWIDTH ON THE
NRV CONNECTION?
No, FlexCache does not have a mechanism to throttle the bandwidth usage
of the NRV protocol.
HOW DOES FLEXCACHE INTERACT WITH
MULTISTORE?
FlexCache volumes can be created only from vfiler0.FlexCache volumes
can cache origins on any vFiler appliance.Origin volumes cannot be destroyed or
moved in vFiler appliances with the command vfiler move , add, remove, or destroy.
FlexCache volume mapping.
DOES FLEXCACHE WORK WITH
METROCLUSTER?
Yes.
HOW DOES FLEXCACHE INTERACT WITH
V-SERIESSYSTEMS?
A V-Series system can act as an origin volume for FlexCache volumes on
FAS systems.
A volume for FlexCache volumes on another V system can act as a
FlexCache volume for origin volumes on FAS systems.
A V-Series system can act as an origin volume with FlexCache volumes on
the same system (hierarchical storage management).
WHAT IS THE DIFFERENCE BETWEEN
FLEXCACHE AND NETCACHE?
NetCache® caches network protocols such as HTTP, FTP, and NNTP.
FlexCache caches storage protocol NFS v2 and v3.
THE AUTOGROW FEATURE WHAT IS THE
AUTOGROW FEATURE?
-
The autogrow feature automatically manages the
size of FlexCache volumes.
The size of a FlexCache volume increases automatically,
providing more disk space for storing cached data (assuming that there is
available space in the aggregate).
-
FlexCache volumes that are too small can
negatively affect cache performance.
-
Automatically increasing the volume size minimizes
the need to eject data from the cache.
-
If you have several FlexCache volumes sharing
the same aggregate, the volumes that are getting the most data accesses also
receive the most space.
How to create FlexCache Volume
Create the
volume: vol create cache_vol aggr [size{k|m|g|t}] -S origin:source_vol
(*** For best performance, do not specify a size when you create a
FlexCache volume. Specifying a size disables the FlexCache Autogrow capability.)
Methods to view FlexCache
statistics
- The flexcache stats command (client and server
statistics)
- The nfsstat command (client statistics only)
- The perfstat utility
- The stats command