Document revision date: 15 July 2002 | |
Previous | Contents | Index |
On larger machines, XFC may be somewhat limited by the default size of the modified page list. In general, the modified page list can be considered a 1 to 1 correspondence data cache. XFC is a many to one cache; that is, in general, a cached page is accessed by many users. On large memory systems, AUTOGEN usually sets MPW_HILIMIT to a very large value. This may mean that there are not enough free pages for the memory management subsystem to give to XFC.
You can force XFC to have a minimum number of pages as specified in Setting a Minimum Size. You can also permanently allocate memory just for XFC, which prevents any overhead caused by the dynamic allocation and deallocation routines (similar in operation to VIOC). To do this, set system parameter VCC_MAX_CACHE to be equal to the memory reservation specified by VCC$MIN_CACHE_SIZE.
For example, if your system has 128GB of memory, you may find that by dedicating 8GB of memory to XFC, your cache hit rates and overall response time is consistently good. For example:
$ RUN SYS$SYSTEM:SYSGEN SYSGEN> USE CURRENT SYSGEN> SET VCC_MAX_CACHE 8000 SYSGEN> WRITE ACTIVE $ RUN SYS$SYSTEM:SYSMAN SYSMAN> RESERVED_MEMORY ADD VCC$MIN_CACHE_SIZE /SIZE=8000 /ALLOCATE - _SYSMAN> /NOGLOBAL_SECTION /NOZERO /NOPAGE_TABLE/RAD=0 |
The dynamic system parameter VCC_MAX_IO_SIZE controls the maximum size of I/O that can be cached by XFC. This parameter specifies the size in blocks. By default, it is 128.
This example changes the maximum size of I/O that can be cached by XFC to 1,000 blocks:
$ RUN SYS$SYSTEM:SYSGEN SYSGEN> USE CURRENT SYSGEN> SET VCC_MAX_IO_SIZE 1000 SYSGEN> WRITE ACTIVE |
This series of commands affects I/Os to volumes currently mounted on
the local node, as well as to volumes mounted in the future. After you
enter these commands, XFC does not cache I/Os that are bigger than
1,000 blocks. The SHOW MEMORY /CACHE /FULL command provides a histogram
of I/O sizes that can provide guidelines for efficient parameter
setting.
18.5.3 Disabling Caching for a File
To prevent XFC to from caching a particular file, such as a database file, set the caching attribute of the file to no caching.
The caching attribute of a file is the default caching option that is used by XFC when an application accesses the file without specifying which caching option it wants to use. The caching option can be either write-through caching or no caching.
If you want a file to be cached, set its caching attribute to write-through (the default). If you don't want a file to be cached, set its caching attribute to no caching.
Use... | To... |
---|---|
SET FILE /CACHING_ATTRIBUTE=keyword + | Set the caching attribute of a file or directory |
DIRECTORY /CACHING_ATTRIBUTE or
DIRECTORY /FULL |
Show the caching attribute of a file or directory |
DIRECTORY /SELECT=CACHING_ATTRIBUTE=(keyword[,...]) + | Show all the files and directories that have a particular caching attribute |
XFC does not cache directories. The caching attribute of a directory controls only how the caching attribute is inherited by new files and subdirectories created in the directory:
$ SET FILE DISK$USERS:[SMITH]BORING.DIR;1 /CACHING_ATTRIBUTE=NO_CACHING $ SET FILE DISK$USERS:[SMITH.BORING...]*.*;* /CACHING_ATTRIBUTE=NO_CACHING |
$ DIRECTORY MYFILE.TXT /CACHING_ATTRIBUTE Directory DISK$USERS:[SMITH] MYFILE.TXT;1 Write-through Total of 1 file. |
$ DIRECTORY DISK$USERS:[000000...]*.* /SELECT=CACHING_ATTRIBUTE=NO_CACHING |
XFC uses a technique called read-ahead caching to improve the performance of applications that read data sequentially. It detects when a file is being read sequentially in equal-sized I/Os, and fetches data ahead of the current read, so that the next read instruction can be satisfied from cache.
To disable read-ahead caching on the local node, set the dynamic system parameter VCC_READAHEAD to 0. By default, this parameter is 1, which allows the local node to use read-ahead caching.
This example disables read-ahead caching on the local node:
$ RUN SYS$SYSTEM:SYSGEN SYSGEN> USE CURRENT SYSGEN> SET VCC_READAHEAD 0 SYSGEN> WRITE ACTIVE |
This series of commands affects volumes currently mounted on the local
node, as well as volumes mounted in the future. Once you enter these
commands, read-ahead caching is not used on the local node.
18.5.5 Monitoring Performance
XFC provides more information than VIOC. For example, you can obtain
information on system-wide, volume-wide, or even a per-file basis. Disk
I/O response times are also available. See the OpenVMS DCL Dictionary: N--Z for a
description of the SHOW MEMORY command.
18.5.5.1 System-Wide Statistics
Use SHOW MEMORY /CACHE to monitor the overall system performance of XFC. For example:
$ SHOW MEMORY /CACHE System Memory Resources on 26-JAN-2001 15:58:18.71 Extended File Cache (Time of last reset: 24-JAN-2001 15:03:39.05) Allocated (Mbytes) (1) 3000.00 Maximum size (Mbytes) (11) 5120.00 Free (Mbytes) (2) 2912.30 Minimum size (Mbytes) (12) 3000.00 In use (Mbytes) (3) 87.69 Percentage Read I/Os (13) 98% Read hit rate (4) 92% Write hit rate (14) 0% Read I/O count (5) 178136 Write I/O count (15) 1867 Read hit count (6) 165470 Write hit count (16) 0 Reads bypassing cache (7) 2802 Writes bypassing cache (17) 39 Files cached open (8) 392 Files cached closed (18) 384 Vols in Full XFC mode (9) 0 Vols in VIOC Compatible mode (19) 4 Vols in No Caching mode (10) 1 Vols in Perm. No Caching mode (20) 0 |
(1) Allocated | The amount of memory currently allocated to the cache. |
(2) Free | The amount of memory currently allocated to the cache that is not being used. |
(3) In Use | The amount of memory currently allocated to the cache that is being used. This is the difference between the Allocated value and the Free value. |
(4) Read hit rate | The ratio of the Read hit count field divided by the Read I/O count field. |
(5) Read I/O count | The total number of read I/Os seen by the cache since system startup. |
(6) Read hit count | The total number of read hits since system startup. A read hit is a read I/O that did not require a physical I/O to disk because the data was found in the cache. |
(7) Reads bypassing cache | The total number of read I/Os since system startup that were seen by the cache but were not cached, for example, because they were too big, or they were for volumes mounted /NOCACHE, or they specified one of the following QIO modifiers: IO$M_DATACHECK, IO$M_INHRETRY, or IO$M_NOVCACHE. |
(8) Files cached open | The number of open files currently being cached. |
(9) Volumes in Full XFC mode | Reserved for Compaq. Should be 0. |
(10) Volumes in No Caching mode | If caching is disabled on the local node or on another node in the OpenVMS Cluster, this is the number of volumes that are currently mounted on the local node. Otherwise it is zero. |
(11) Maximum size | The maximum size that the cache could ever grow to. |
(12) Minimum size | The minimum size that the cache could ever shrink to. This is controlled by the value of the VCC$MIN_CACHE_SIZE entry in the reserved memory registry. |
(13) Percentage Read I/Os | Percentage of I/Os that are reads. |
(14) Write hit rate | This field is reserved for future use. |
(15) Write I/O count | The total number of write I/Os seen by the cache since system startup. |
(16) Write hit count | This field is reserved for future use. |
(17) Writes bypassing cache | The total number of write I/Os since system startup that were seen by the cache but were not cached, for example, because they were too big, or they were for volumes mounted /NOCACHE, or they specified one of the following QIO modifiers: IO$M_DATACHECK, IO$M_ERASE, IO$M_INHRETRY, or IO$M_NOVCACHE. |
(18) Files cached closed | The number of closed files that still have valid data in the cache. |
(19) Volumes in VIOC compatible mode | The number of volumes being cached by XFC that are using the VCC caching protocol. As of OpenVMS Version 7.3, XFC uses only VCC caching protocol. |
(20) Vols in Perm. No Caching mode | This field should be zero. If nonzero, XFC has detected an illegal write operation to this device and has disabled caching to this device. |
See the OpenVMS DCL Dictionary: N--Z for a description of the SHOW MEMORY command.
18.5.6 Using XFC in a Mixed Architecture OpenVMS Cluster
In an OpenVMS Cluster, some nodes can use XFC and other nodes can use VIOC. This allows mixed architecture clusters to benefit from XFC.
When a volume is mounted on a node that is using VIOC, the nodes using
XFC cannot cache any files in the volume that are shared for writing. A
file that is shared for writing is one that is being
accessed by more than one node in an OpenVMS Cluster, and at least one
of those nodes opened it for write access.
18.6 Managing the Virtual I/O Cache
This section describes how to manage VIOC. It describes the following tasks:
Task | Section |
---|---|
Selecting VIOC on an Alpha system | Section 18.6.2 |
Controlling the size of the cache | Section 18.6.3 |
Monitoring performance | Section 18.6.4 |
The virtual I/O cache is a clusterwide, write-through, file-oriented,
disk cache that can reduce the number of disk I/O operations and
increase performance. The purpose of the virtual I/O cache is to
increase system throughput by reducing file I/O response times with
minimum overhead. The virtual I/O cache operates transparently of
system management and application software, and maintains system
reliability while it significantly improves virtual disk I/O read
performance.
18.6.1 Understanding How the Cache Works
The virtual I/O cache can store data files and image files. For example, ODS-2 disk file data blocks are copied to the virtual I/O cache the first time they are accessed. Any subsequent read requests of the same data blocks are satisfied from the virtual I/O cache (hits) eliminating any physical disk I/O operations (misses) that would have occurred.
Depending on your system work load, you should see increased application throughput, increased interactive responsiveness, and reduced I/O load.
Applications that initiate single read and write requests do not benefit from virtual I/O caching as the data is never reread from the cache. Applications that rely on implicit I/O delays might abort or yield unpredictable results. |
Several policies govern how the cache manipulates data, as follows:
If for some reason, you want an Alpha system to use VIOC instead of XFC, follow these steps:
$ RUN SYS$SYSTEM:SYSMAN SYSMAN> RESERVED_MEMORY REMOVE VCC$MIN_CACHE_SIZE /NOGLOBAL_SECTION |
If you forgot to remove the VCC$MIN_CACHE_SIZE entry from the reserved memory registry in Step 1, memory is allocated to XFC even though XFC is not loaded. Nothing can use this memory. If this happens, use the Sysman utility's RESERVED_MEMORY FREE command to release this memory:
$ RUN SYS$SYSTEM:SYSMAN SYSMAN> RESERVED_MEMORY FREE VCC$MIN_CACHE_SIZE /NOGLOBAL_SECTION |
The way that you control the size of VIOC depends on whether you have an OpenVMS Alpha or OpenVMS VAX system.
On OpenVMS Alpha systems, the size of VIOC is fixed at system startup time. The cache can't shrink or grow. The value of the static system parameter VCC_MAXSIZE specifies the size of the cache in blocks. By default it is 6400 blocks (3.2MB).
To change the size of VIOC on an OpenVMS Alpha system, follow these steps:
On OpenVMS VAX systems, you can use the static system parameter VCC_PTES to specify the maximum size of VIOC. This parameter specifies the size in pages. By default it is 2,000,000,000.
VIOC automatically shrinks and grows, depending on your I/O workload and how much spare memory is available on your system. As your I/O workload increases, the cache automatically grows, but never to more than the maximum size. And when your applications need memory, the cache automatically shrinks.
To change the maximum size of VIOC on an OpenVMS VAX system, follow these steps:
Use the DCL command SHOW MEMORY/CACHE/FULL to display statistics about the virtual I/O cache, as shown in the following example:
$ SHOW MEMORY/CACHE/FULL System Memory Resources on 10-OCT-1994 18:36:12.79 Virtual I/O Cache Total Size (pages) (1) 2422 Read IO Count (6) 9577 Free Pages (2) 18 Read Hit Count (7) 5651 Pages in Use (3) 2404 Read Hit Rate (8) 59% Maximum Size (SPTEs) (4) 11432 Write IO Count (9) 2743 Files Retained (5) 99 IO Bypassing the Cache (10) 88 |
This example shows the output for the SHOW MEMORY/CACHE/FULL command on a VAX system. The SHOW MEMORY/CACHE/FULL command displays slightly different fields on an Alpha system. |
(1) Total Size | Displays the total number of system memory pages that VIOC currently controls. |
(2) Free Pages | Displays the number of pages controlled by VIOC that do not contain cache data. |
(3) Pages in Use | Displays the number of pages controlled by VIOC that contain valid cached data. |
(4) Maximum Size | Shows the maximum size that the cache could ever grow to. |
(5) Files Retained | Displays the number of files that are closed but the file system control information is being retained because they have valid data residing in the cache. |
(6) Read I/O Count | Displays the total number of read I/Os that have been seen by VIOC since the last system. |
(7) Read Hit Count | Displays the total number of read I/Os that did not do a physical I/O because the data for them was found in the cache since the last system BOOT. |
(8) Read Hit Rate | Displays the read hit count and read I/O count ratio. |
(9) Write I/O Count | Shows the total number of write I/Os that have been seen by the cache since the last system BOOT. |
(10) I/O Bypassing | Displays the count of I/Os that for some reason did not attempt to satisfy the request/update by the cache. |
By default, virtual I/O caching is enabled. Use the following system parameters to enable or disable caching. Change the value of the parameters in MODPARAMS.DAT, as follows:
Parameter | Enabled | Disabled |
---|---|---|
VCC_FLAGS (Alpha) | 1 | 0 |
VBN_CACHE_S (VAX) | 1 | 0 |
Once you have updated MODPARAMS.DAT to change the value of the appropriate parameter, you must run AUTOGEN and reboot the node or nodes on which you have enabled or disabled caching. Caching is automatically enabled or disabled during system initialization. No further user action is required.
Previous | Next | Contents | Index |
privacy and legal statement | ||
6017PRO_081.HTML |