Accessing shared memory details

When you configure a host to run more than one recognition service, the Recognizer optimizes system capacity by automatically creating a shared-memory region. The recognition service instances on a host use this region to share resources like acoustic models.

Shared memory is enabled by default for any role running multiple recognition service instances. Do not disable it. It is disabled for roles running a single recognition service because it isn’t needed.

Viewing shared memory details

To access this information:

  1. Select a host and click the Shared Memory Details link (Monitoring & Control→System Control→Vital Signs).

    For example:

    Note: This feature is not available for roles running a single recognition service instance.

    The relevant details are:

    • Shared Memory Status region—Amount of shared memory currently used / amount of allocated shared memory.
    • Shared Memory Total Size—Amount of memory available for resource sharing by all recognition service instances on this host. The default, in bytes, is 4294967296 (4 GB). Configurable with the swirec_shmem_size parameter, discussed below.
    • Shared Memory Allocatable Size—Amount of memory actually reserved for resource sharing. It is smaller that the total since the Recognizer sets aside a small region to manage shared memory.
    • Allocated (total)—Amount of memory currently used by the recognition service instances.
    • Free (total): Remaining amount of reserved shared memory available for use. Free (total) + Allocated (total) = Shared Memory Allocatable Size.
    • The other fields are generally only of interest to Nuance.
  2. Click Save to save the information to a text file in a location of your choice.

Configuring shared memory parameters

If necessary, you can configure these shared memory parameters:

  • swirec_shmem_size—Specifies the total amount of shared memory. The default is 4294967296 bytes (4 GB). Note that the more shared memory you reserve, the less memory there is available for other purposes. You need to take into account the physical limits of the machine and the need to leave sufficient amounts of non-shared memory available.
  • swirec_shmem_warn_threshold—Specifies the threshold as a percentage of shared-memory usage. When the threshold is surpassed, each recognition service instance generates an minor alarm warning that the region is getting full. The threshold is automatically reset once the memory usage drops 10% below the threshold. If the threshold is exceeded again, a new set of alarms is generated. The default is 90 (percent).

To specify different values for these parameters, you must add them to the User-NRS0num.xml files located under %SWISRSDK%\config. %SWISRSDK% is the location of the Recognizer component. The num value refers to the particular recognition service instance. The value must be the same across all instances.