HP OpenVMS System Manager's Manual, Volume 2:... |
Managing File System Data Caches |
|
|
| |
| Task | Section |
|---|---|
|
Ensuring that
XFC interoperates with older versions
|
Ensuring that XFC Interoperates with Older Versions
|
|
Controlling
the size of the cache
|
Controlling the Size of the Cache
|
|
Controlling
the maximum cached I/O size
|
Controlling the Maximum Cached I/O Size
|
|
Disabling caching
for a file
|
Disabling Caching for a File
|
|
Disabling read-ahead
caching
|
Disabling Read-Ahead Caching
|
|
Monitoring
performance
|
Monitoring Performance
|
|
Using XFC in a mixed architecture
OpenVMS Cluster
|
Using XFC in a Mixed Architecture OpenVMS Cluster
|
Ensuring
that XFC Interoperates with Older Versions ![]()
If you have an OpenVMS Cluster system that contains earlier
versions of OpenVMS Alpha or OpenVMS VAX and you want to use XFC
with OpenVMS Version 7.3 or higher or I64 systems, you must install
remedial kits on the systems that are running the earlier versions
of OpenVMS.
| The remedial kits referred to in the previous section correct errors in the cache-locking protocol of VIOC, the predecessor to XFC, and allow older versions of the caches to operate safely with the new XFC. Without the functionality in the remedial kits, however, the system or processes might hang. |
Controlling the Size of the Cache ![]()
This section describes how to control the minimum and maximum
size of XFC
XFC is held in virtual memory in S2 space and automatically shrinks and grows, depending on your I/O workload and how much spare memory is available on your system. S2 space is a 64-bit address space, so the cache can grow to very large sizes when required.
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, but never to less than the minimum size.
Controlling the Minimum Cache Size ![]()
The minimum size of XFC is controlled by the value of the
VCC$MIN_CACHE_SIZE entry in the reserved memory registry. VCC$MIN_CACHE_SIZE
specifies the amount of memory in megabytes (MB) that is allocated
to XFC at system startup. The cache never shrinks below this size.
This memory is never released.
To check the minimum size of XFC, use either the Sysman utility command RESERVED_MEMORY /SHOW or the DCL command SHOW MEMORY /RESERVED. For example:
Setting a Minimum Size$SHOW MEMORY /RESERVEDSystem Memory Resources on 11-MAY-2000 15:50:25.64 Memory Reservations (pages): Group Reserved In Use Type Allocated VCC$MIN_CACHE_SIZE --- 1536 1536 Total (400.00 Mb reserved) 1536 1536
By default, the reserved memory registry does not contain an entry for VCC$MIN_CACHE_SIZE, so no memory is allocated to XFC at system startup. However, XFC allocates a small amount of memory to maintain overall system throughput. The amount of memory allocated varies according to the size of your machine.
To set a minimum size, follow these steps:
You must use all the qualifiers shown in this example. For best performance, set the minimum size to a multiple of 4MB.$RUN SYS$SYSTEM:SYSMANSYSMAN>RESERVED_MEMORY ADD VCC$MIN_CACHE_SIZE /SIZE=300 /ALLOCATE -_SYSMAN>/NOGLOBAL_SECTION /NOZERO /NOPAGE_TABLE
$RUN SYS$SYSTEM:SYSMANSYSMAN>RESERVED_MEMORY ADD VCC$MIN_CACHE_SIZE /SIZE=300 /ALLOCATE -_SYSMAN>/NOGLOBAL_SECTION /NOZERO /NOPAGE_TABLE/RAD=0SYSMAN>RESERVED_MEMORY EXTEND VCC$MIN_CACHE_SIZE /SIZE=500 /ALLOCATE -_SYSMAN>/NOGLOBAL_SECTION /NOZERO /NOPAGE_TABLE/RAD=1
To change the minimum size of XFC, follow these steps:
You must use all the qualifiers shown in this example. For best performance, remember to set the minimum size to a multiple of 4MB.$RUN SYS$SYSTEM:SYSMANSYSMAN>RESERVED_MEMORY MODIFY VCC$MIN_CACHE_SIZE /SIZE=360 /ALLOCATE -_SYSMAN>/NOGLOBAL_SECTION /NOZERO
Controlling the Maximum Cache Size ![]()
To control the maximum size of XFC, use the dynamic system
parameter VCC_MAX_CACHE. It specifies the size in megabytes.
By default, VCC_MAX_CACHE is -1, which means that at system startup, the maximum size of XFC is set to 50 percent of the physical memory on the system. For example, if the system has 2GB of physical memory, its maximum size is set to 1GB.
Note that the maximum size specified by VCC_MAX_CACHE does not include the memory that XFC consumes indirectly via the OpenVMS lock manager.
The value of VCC_MAX_CACHE at system startup sets an upper limit for the maximum size of XFC. You cannot increase the maximum size beyond that value.
For example, VCC_MAX_CACHE is 60 at system startup, so the maximum size is initially set to 60MB. You then set VCC_MAX_CACHE to 40, which decreases the maximum size to 40MB. If XFC is larger than 40MB, it gradually shrinks to 40MB. You then set VCC_MAX_CACHE to 80, but the maximum size is only increased to 60MB, the value set at system startup. You cannot increase the maximum size beyond the value set at system startup.
If VCC_MAX_CACHE is less than the minimum size specified by the value of the VCC$MIN_CACHE_SIZE entry in the reserved memory registry, then during system startup, VCC_MAX_CACHE is ignored and the maximum size of XFC is set to the same value as the minimum size. In this case, XFC has a fixed size and cannot shrink or grow.
This example reduces the maximum size of XFC on the active system from 60 MB to 40MB:
$RUN SYS$SYSTEM:SYSGENSYSGEN>USE ACTIVESYSGEN>SET VCC_MAX_CACHE 40SYSGEN>WRITE ACTIVE
The following example makes the change persistent across reboots by changing the current parameter set:$SET CACHE /RESET
$RUN SYS$SYSTEM:SYSGENSYSGEN>USE CURRENTSYSGEN>SET VCC_MAX_CACHE 40SYSGEN>WRITE CURRENT
To make this change permanent, you must enter it into MODPARAMS.DAT. The change will take effect after the next reboot.
Enabling a Static Cache Size ![]()
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 Controlling the Minimum Cache 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:
To make the change to VCC_MAX_CACHE permanent, you must enter it into MODPARAMS.DAT. This change will take effect after the next reboot. HP recommends that you run AUTOGEN to ensure that other system parameters allow for the new value.$RUN SYS$SYSTEM:SYSGENSYSGEN>USE CURRENTSYSGEN>SET VCC_MAX_CACHE 8000SYSGEN>WRITE CURRENT$RUN SYS$SYSTEM:SYSMANSYSMAN>RESERVED_MEMORY ADD VCC$MIN_CACHE_SIZE /SIZE=8000 /ALLOCATE -_SYSMAN>/NOGLOBAL_SECTION /NOZERO /NOPAGE_TABLE/RAD=0
Controlling the Maximum Cached I/O Size ![]()
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 127.
This example changes the maximum size of I/O that can be cached by XFC to 1,000 blocks:
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 larger 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.$RUN SYS$SYSTEM:SYSGENSYSGEN>USE ACTIVESYSGEN>SET VCC_MAX_IO_SIZE 1000SYSGEN>WRITE ACTIVE
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 do not want a file to be cached, set its caching attribute to no caching.
| Use... | To... |
|---|---|
|
SET FILE /CACHING_ATTRIBUTE=keyword 1
|
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:
[SMITH.BORING]. SET FILE command sets the attribute for the directory to make
sure that all files and subdirectories subsequently created in it
inherit the attribute. The second SET FILE command sets the attribute for all existing files and
directories in and under 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 command's /CACHING_ATTRIBUTE qualifier to show the caching attribute
of MYFILE.TXT: $DIRECTORY MYFILE.TXT /CACHING_ATTRIBUTEDirectory DISK$USERS:[SMITH] MYFILE.TXT;1 Write-through Total of 1 file.
$DIRECTORY DISK$USERS:[000000...]*.* /SELECT=CACHING_ATTRIBUTE=NO_CACHING
Disabling Read-Ahead 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:
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.$RUN SYS$SYSTEM:SYSGENSYSGEN>USE ACTIVESYSGEN>SET VCC_READAHEAD 0SYSGEN>WRITE ACTIVE
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 HP OpenVMS DCL Dictionary: N--Z for
a description of the SHOW MEMORY command.
System-Wide
Statistics ![]()
Use SHOW MEMORY /CACHE to monitor the overall system performance of XFC. For
example:
$SHOW MEMORY /CACHESystem 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 Files 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 rade |
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 future use by HP. 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] Write 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 HP OpenVMS DCL Dictionary: N--Z for a description of the SHOW MEMORY command.
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 notes opened it for write access.
1 keyword can be either WRITETHROUGH or NO_CACHING
( Number takes you back )
|
|