19
VirusScan
®
Command Line 5.20.0 Product Guide
Using the Command-Line Scanner
Using memory caches
3
Using memory caches
When scanning a file for viruses and other potentially unwanted software, the scanner
reads the file into computer memory in amounts determined by the operating system.
Although changes are not normally necessary, you can improve the scanning speed by
increasing the amount of memory that the scanner uses. This can be controlled by the
following options:
/OCRS
/OCMAX
/AFC
Options
/OCRS
and
/OCMAX
are intended for use with offline or remote storage, such
as Hierarchical Storage Management (HSM). The
/AFC
option can improve scanning
performance in some cases.
OCRS
Typically the scanner reads only a few kilobytes of a file at a time, therefore a large
number of reads might be required per file. The
/OCRS
option causes the scanner to use
a larger internal “cache” for each file read instead. The size of reads for this cache is
determined by a value in the range 0 through 4, as follows:
/OCRS=0
— 128
KB
/OCRS=1
— 256
KB
/OCRS=2
— 512
KB
/OCRS=3
— 1
MB
/OCRS=4
— 2
MB
OCMAX
The
/OCMAX
option changes the maximum size of the internal cache for file reads. By
default, the scanner typically caches up to
eight
reads per file and uses a cache read
size of 128KB — and therefore a maximum cache size of 1
M
, which is 128
KB
x 8).
When setting the maximum size explicitly, you must specify the value of
/OCMAX
as a
number of Megabytes. See the following examples for
/OCRS
and
/OCMAX
.
Use 512
KB
read size. This
implies
a maximum cache size (
OCMAX
) of 4
MB
(8 x 512
KB
).
SCAN C:\ /OCRS=2
Use 1
MB
read size. This
implies
a maximum cache size (
OCMAX
) of 8
MB
(8 x 1
MB
).
SCAN C:\ /OCRS=3
Use a 1
MB
read size, but limit the cache size to 4
MB
.
SCAN C:\ /OCRS=3 /OCMAX=4
Use a 2MB read size, but limit the cache size to 8
MB
.
SCAN C:\ /OCRS=4 /OCMAX=8
AFC
When scanning files, the scanner places the contents into computer memory (or
file
cache
) before scanning them. This option allows you to vary the amount of cache that
the scanner uses.