Tuning Memory Usage by Reducing Available Engines

Tuning Memory Usage by Reducing Available Engines

Speech Engine Services (SES) preloads application resources into all available engine instances by default. Depending on the size of application resources, this may consume more than optimal system memory.

Default settings specify the initial number of instances, as the following table demonstrates.

Engine Type

Default # instances

TelephonyRecognizer

24 (services grammar files for voice input)

Voice

24 (services prompt databases for voice output)

DtmfRecognizer

6 (services grammar files for DTMF input)

MultiModalRecognizer

0 (services resources for multimodal applications; must be set by the administrator)

One approach to reducing SES memory usage is to lower the number of available instances. Consider, for example, a voice-only application that contains a 50 kb grammar file. Loading the file into each of 24 engine instances consumes 1.2 mg of memory. Decreasing engine instances to 12 would result in a memory gain of 600 kb.

Note  While decreasing engine instances may lower memory usage, it also affects the ability to handle overall system load. To maintain existing load, more machines may be required.

On the other hand, consider raising the number of SES engine instances if available memory and CPU speed are both high, and the system needs to handle increased load.

To increase or decrease engine instances for a particular configuration, see Modifying the Number of Available Engines.

See Also

About Engine Configurations | Tuning Memory Usage by Creating a Dedicated Engine Configuration | Speech Engine Services Memory Usage: Overview