PROIV Genfile Caching Overview

Under high load it is possible that there may be contention while loading functions from the PROIV runtime bootstraps. Genfile Caching has been introduced in an effort to ameliorate the effects of this. It is a simple and robust caching system in the process workspace.

Definition

If a function is to be executed and its specs are found in the cache, then they are reused. No operating system calls take place, the code is effectively multi-threaded and there is no contention. Therefore, no I/O to the file system is needed. However, it is important to note that the disadvantage of this is increased memory requirements per process. Analysis has shown that even as little as an extra 1 MB per user can yield cache hit-to-miss rates of over 6 to 1.

A concern for all caching systems is cache coherency, which is when the cache gets out of synchronisation with its disk copy. The Genfile Caching solution takes advantage of the fact that the function spec A records are read first, and are date and time stamped by the PROIV Virtual Machine (not PROIV Developer or 3rd party tools) every time the function is genned. PROIV does not cache the A record, but compares its details with the other records already cached for the function. In the event of a mismatch the cache is invalidated. This ensures that the cache works transparently and if a function is changed, the next load is from the disk, not from the cache.

Recommended Size

The recommended Genfile Cache size is between 1 - 2 MB. The increased memory use is partly offset by the memory saved through PROISAM buffering. In addition, using Function Autosizing functionality can also reduce the memory impact.

Section links:

PROIV Genfile Caching Benefits discusses the benefits of caching and how the benefits are calculated.

PROIV Genfile Caching Environment Variables outlines the Environment Variables that are used to configure the caching functionality.

Comment on this topic

Topic ID: 720296

 
 
 

Table of Contents

Index

Glossary

-Search-

Back