Optimizing flow control for SSM
Optimize the IBM® Spectrum Symphony session manager (SSM) through flow control. Flow control prevents session manager from exhausting critical system resources, which may occur under extreme workload.
About this task
Flow control does the following:
- Monitors the status of system resources for session manager:
- Available memory (physical memory available on the host), in MB.
- Available virtual address space (for each process), in MB. The maximum configurable size is 8T for 64-bit operating systems (that is, 8388608 MB).
- Process memory (physical memory available for each process), in MB.
- Raises the following events when a certain threshold has been reached:
- NORMAL: Operates in default mode for any new input.
- PROACTIVE: Gives early warning to system components that can make memory available when required.
- SEVERE: Starts to scavenge as much memory as possible, current clients work fine.
- CRITICAL: Starts to slow data inflow to the session manager and raise the priority of getting data out of the session manager. Rejects new connections, suspends new sessions from currently attached clients, and appends new tasks in those suspended sessions (current sessions and tasks are not affected).
- HALT: Session manager enters into locked mode, so no further processing is allowed until an administrative action is performed, or the system enters a safer state.
Procedure
What to do next
- Set memory allocation parameters
- If the SSM on Linux® remains at a critical memory level
when there is enough available memory and not much unfinished workload, the SSM may not be detecting
correct memory usage. This can cause the boundary event not to be triggered properly. If this
situation occurs, try setting the following environment variables for the SSM in your application
profile:
<env name="MMAP_THRESHOLD">131072</env> <env name="MMAP_MAX">65536</env>
Note: TheMMAP_THRESHOLD
value should be smaller than the average task input or output size. - Optimize data paging for irrecoverable sessions
- To speed up paging and session manager recovery, the specified directory can be on the local
drive since the paged data of irrecoverable sessions does not need to be persisted at a shared
location. The following elements and attributes in the SOAM section of the application profile are related to task message data and common data paging for irrecoverable sessions:
- Increase SSM performance by setting SSM to dispatch more than one task to the SIM's service instance queue
- Allow the SSM to dispatch tasks faster by increasing the number of tasks no longer queued from
the SSM's pending tasks queue, and then dispatched to the SIM, at one time. To enable this feature,
under the maxQueuedTasksAtSim to 1
or more (by default, it is 0). Once enabled, then minQueuedTasksAtSim is used
and defaults to 1. If you set maxQueuedTasksAtSim to 1 or more, also ensure it
is greater than or equal to minQueuedTasksAtSim.
To disable this feature, set maxQueuedTasksAtSim to 0. This is the default. Once disabled, then minQueuedTasksAtSim is ignored.
For example, to set SIM to queue at least two pending tasks, and up to ten pending tasks, set the following in your application profile:<SessionTypes> <Type name="MySession" abortSessionIfTaskFail="false" abortSessionIfClientDisconnect="true" persistTaskHistory="all" priority="1" recoverable="true" sessionRetryLimit="3" taskCleanupPeriod="100" maxQueuedTasksAtSim="10" minQueuedTasksAtSim="2" suspendGracePeriod="100" taskRetryLimit="3"/> </SessionTypes>
Note: This feature is optimized for short task run times (that is, tasks less than one second long). When this feature is enabled, the SSM allocates a minimum number of slots so that all queues are full. However, if you have a small number of tasks, and many free slots, this feature does not utilize all slots.The formula to calculate the minimum number of slots that SSM allocates, is as follows:- If the number of slots is more than
(total tasks)/(maxQueuedTasksAtSim+1)
, SSM will use the value of(total tasks)/(maxQueuedTasksAtSim+1)
as the number of slots to use. - If the number of slots is less than
(total tasks)/(maxQueuedTasksAtSim+1)
, all the slots will be used.
section of the application profile, set - If the number of slots is more than