Feedback

  • Contents
 

Recognition Configuration - Grammar Cache

Use this page to configure the settings for the grammar cache.

Note: These settings should only be modified under the direction of PureConnect Customer Care.  Any modifications to these values can have a significant impact on the behavior of the system.

Grammar Cache Directory

This is the directory where the RecoSubsystem maintains the grammar cache.  If no directory is specified, the system uses the “Work Path” server parameter.  

Grammar Source Data Size Limit (bytes)

This is the maximum number of bytes the source of a single parsed grammar may be comprise of.  This setting is used to prevent denial of service attacks by specifying excessively large grammar source files.  This limit does not apply to grammars that are not parsed (to allow large binary, engine specific grammars).

Max Per Grammar Data Memory Size (bytes)

This is the maximum size (in characters) the source of a grammar may have before it is cached in a file.  Data of grammars that is smaller than this value are cached in memory.  

Max Total Grammar Data Memory Cache (bytes)

This is the maximum number of bytes the in-memory cache of the grammar source may contain. If the size of all grammar data cached in memory exceeds this value, the data of subsequently cached grammars is cached in a file (regardless of size).

Note: This does not include the memory occupied by the parse-trees of parsed grammars.

Grammar Cache Cleanup Interval (sec)

This is the interval between garbage collections in the grammar cache (time in seconds).

Min Grammar Idle Time (sec)

This is the minimum amount of time that has to elapse since the last reference to a grammar before that grammar is eligible for garbage collection (in seconds).

Grammar Cache Idle Baseline

This setting specifies the minimum number of idle grammars always left in the cache. Even after idle grammars are eligible for removal because the amount of time passed since last use, the number of grammars specified by this setting is kept in the cache.  If there are more idle grammars, the oldest ones are removed.  This setting prevents excessive grammars if a system has very low traffic and uses only a few grammars.  Without the baseline idle grammars, the grammars would be unloaded between a call and then re-loaded in the next call (for example if the system is not used for a long time during the night).  

Note: Setting this value too high may lead to excessive virtual memory usage.

Parsed Grammar Cache Size (bytes)

This is the maximum combined size of all parsed grammars held in memory. If all the grammars in the parsed grammar cache occupy more than this, the oldest grammars are serialized to disk and then released.  The next time the grammar is accessed, it's reloaded from disk. Grammars that have been accessed in the last “Min Parsed Grammar Idle Time” seconds or are smaller than “Parsed Grammar Compact Threshold” are not considered.

Note: The calculation of the size of the parsed grammars is only approximate.  Setting this value very low can lead to churn when large grammars are registered frequently.  The default of 16MB should be appropriate in most cases.

Parsed Grammar Compact Threshold (bytes)

Parsed grammars of size less than this setting will never be compacted (saved to disk and parsed object released). This reduces the likelihood that DTMF grammars are being compacted, as they tend to be rather small.

Min Parsed Grammar Idle Time (sec)

This is the minimum amount of time that must pass since the last access before a parsed grammar is considered for compacting (serializing to disk and then releasing the parsed grammar object).