Maintaining data affinity between a session and service instances

Goal

You have services that cache market data for calculations on compute hosts. Each service loads data into memory and this operation is time-consuming compared to the calculation. Once the data is loaded, it does not change, and it can be used for all calculations that are requested.

Use the minimum services (R_MinimumServices) scheduling policy when you are using common data so that service instances will be reused for tasks in the same session, eliminating the need to reload data for each task.

Change your application profile for data affinity

With this scheduling policy, you define a minimum number of service instances to be allocated to a session, regardless of workload or priority of other sessions, and they continue to serve the session until the session is suspended, killed or closed.

Service instances additional to the minimum service instances are proportionally shared among sessions with pending tasks based on session priority. These service instances are allocated and reallocated to sessions based on priority. Sessions that do not have workload are not allocated additional service instances.

Note:

When configuring the R_MinimumServices policy with multiple session types for an application, each resource group name in the resource group filters should be unique among all of the session types; otherwise you may get one less than the configured number of minimum services running.

Note:

If you are editing the application profile outside the Platform Management Console, in the Consumer section, add the parameter policy="R_MinimumServices". In the session types section, add the parameters priority, and minServices and register the application with the soamreg command.

  1. In the Platform Management Console, click Symphony Workload > Configure Applications.

    The Applications page displays.

  2. Select the application you want to modify.

    The Application profile page displays.

  3. Select SSM scheduling policy to expand it, then under Policy Name, select R_Minimum Services.
  4. In the Session Type definition, define the Priority for sessions of this type and the Minimum Services (minimum number of CPU slots required for sessions of this type).

    The minimum number of slots remains allocated to the session regardless of workload or priority of other sessions.

    The priority value is used to allocate service instances other than the minimum number of service instances.

    For example, you have 66 service instances and three session types, and you defined the minimum number of instances to be two per session type.

    Two instances are allocated to each session to meet the minimum instance requirement. Then, additional instances are allocated proportionally based on priority.


    Session and Session Type

    Minimum service instances configured

    Priority

    Allocated intances

    Allocated instances

    (minimum)

    Allocated instances

    (additional)

    Session1, SessionA

    2

    10

    2

    10

    Session2, SessionB

    2

    20

    2

    20

    Session3, SessionC

    2

    30

    2

    30


    The sessions receive two service instances each. The remaining 60 service instances are distributed to the sessions proportionally based on priority of the session type.

    Session 1 gets 12 service instances in total, 2 gets 22 service instances, and session 3 gets 32 service instances.

  5. Click Save to apply your changes.