The pf module is a data prefetching module for
the MIO user program and is optional.
- pffw
- Prefetch pages even when in write mode.
- nopffw
- Do no prefetch pages when in write mode. This is the default option.
- The default behavior of the pf cache is to not pre-read
a page into the cache if the call that triggered the pre-read is from a user
write into the cache. This because there is no benefit to reading in a page
just to have it overwritten. But if a subsequent user write into the page
is ill-formed (not beginning and ending on sector boundaries), the logic that
marks dirty sectors would no longer be valid, so the dirty pages need to be
synchronously written to disk and then the entire page is read synchronously
into the cache. In this case it is better to just asynchronously read the
page to be overwritten, rather than take the synchronous hit on a page miss.
- release
- Free the global cache pages when the global cache file usage count goes
to zero. This is the default option.
- norelease
- Do not free the global cache pages when the global cache file usage count
goes to zero.
- The release and norelease options control
what happens to a global cache when the file usage count goes to zero. The
default behavior is to close and release the global cache. If a global cache
is opened and closed multiple times there may be memory fragmentation issues
at some point. Using the norelease option keeps the global
cache opened and available even if the file usage count goes to zero.
- private
- Use a private cache. This means that only the file opening the cache may
use it.
- global
- Use a global cache. This means that multiple files can use the same cache
space. This is the default option.
- It has been our experience that a global cache is most often the best
option for several reasons. The amount of memory is deterministic as you will
know how many caches are opened and how large they are. Using private caches,
one may not know how many private caches are active simultaneously. A maximum
of 256 global caches can be opened. The default is to use set the global option
to zero, which means that one global cache is open. Each global cache opened
can be assigned by the user to a particular group of files.
- asynchronous
- Use asynchronous calls to the child module. This is the default option.
- synchronous
- Use synchronous calls to the child module.
- noasynchronous
- Alias for synchronous.
- The asynchronous, synchronous, and noasynchronous options
control whether the cache should use asynchronous I/O calls to load cache
data from the filesystem. Sometimes used for debugging or when aio is not
enabled on the system.
- direct
- Use DIRECT I/O.
- nodirect
- Do not use DIRECT I/O. This is the default option.
- The direct and nodirect options control
whether the O_DIRECT bit is OR'd into the oflags on file open. The pf cache
is capable of doing direct I/O. The cache aligns all cache pages on 4K boundaries
and attempts to issue only well-formed requests that are needed to ensure
that I/O requests go direct.
- bytes
- Output cache stats in units of bytes. This is the default option.
- kbytes
- Output cache stats in units of kilobytes.
- mbytes
- Output cache stats in units of megabytes.
- gbytes
- Output cache stats in units of gigabytes.
- tbytes
- Output cache stats in units of terabytes.
- cache_size
- The total size, in bytes, of the cache. Sizes in kilobytes, megabytes,
gigabytes, and terabytes are also recognized. Default value is 64k.
- page_size
- The size, in bytes, of each cache page. Sizes in kilobytes, megabytes,
gigabytes, and terabytes are also recognized. Default value is 4k.
- prefetch
- The number of pages to prefetch. Default value is 1.
- stride
- Sets the stride factor, in pages. Default value is 1.
- stats{=output_file}
- Output prefetch usage statistics: file name for pf output
diagnostics.
- If no output_file is specified or if it is mioout,
which is the default value, the pf module searches
for an output statistic file defined in the MIO_STATS environment
variable.
- nostats
- Do not output prefetch usage statistics.
- inter
- Output intermediate prefetch usage statistics on a kill -SIGUSR1 command.
- nointer
- Do not output intermediate prefetch usage statistics. This is the default
option.
- The inter option instructs the pf cache
to output usage statistics when a kill -30 command
is received by the application.
- retain
- Retain file data after close for subsequent reopen.
- notain
- Do not retain file data after close for subsequent reopen. This is the
default option.
- The retain option instructs a global pf cache to save
the file's pages in the cache to be reused if the file is reopened in the
same global cache. The underlying file must not have been modified between
the close and open. The file's pages in the cache are still subject to LRU
preemption as though the file were still opened in the cache.
- listio
- Use listio mechanism.
- nolistio
- Do not use listio mechanism. This is the default option.
- The cache normally does not use listio, which has been used primarily
for debugging.
- tag={tag string}
- String to prefix stats flow.
- notag
- Do not use prefix stats flow. This is the default option.
- The tag string is a prefix for output printed to the stats file. When
the stats file gets large this will make it easier to search for sections
of interest.
- scratch
- The file is scratch and to be deleted on close.
- noscratch
- The file is to be flushed saved on close. This is the default option.
- Instructs the cache to treat a file as scratch, meaning the file is not
flushed at close and is unlinked after closing.
- passthru
- Byte range to pass thru the cache.
- The user can specify a range of the file that is not cached. The data
is read and written through the cache. This has been necessary in the past
for parallel applications that write to the same file and share header information
at the start of the file.