Control when applications request or release resources through high- and low-water marks

You can tune your resource requests by specifying a low-water mark in the application profile. The high-water mark is a fixed value.

Both high-water mark and low-water mark are expressed as the ratio of the number of unprocessed tasks to the number of service instances. Unprocessed tasks include both running and pending tasks.

Together, the high-water mark and low-water mark define a range of satisfactory slot allocation, in which the application does not need to request additional resources or release excess resources; refer to the Reference guide for more information about watermark configuration.

  • High-water mark

    High-water mark defines the threshold for the application as a whole, to request more resources in order to meet its service level requirement. It defines a ratio of unprocessed tasks of open sessions to service instances. The value of the high-water mark is fixed at 1. The SSM requests enough resources to satisfy this demand.

    For example, a session with a service-to-slot ratio of 1:1, requests at least one CPU slot for every unprocessed task. If the service-to-slot ratio is set to 1:4, i.e., a task requires 4 slots to run, at least 4 slots for every unprocessed task is requested.

  • Low-water mark allows you to define the threshold for the application as a whole, to return resources that are no longer needed.

    Once the ratio of unprocessed tasks to service instances falls below the taskLowWaterMark, resources are released and made available for other applications to use.

    The following table summarizes the effects of taskLowWaterMark settings.


    Setting

    Result

    0

    SSM does not release any slots

    1

    SSM releases idle slots when there is no pending workload


    Here is an example that illustrates the behavior of taskLowWaterMark for the specified conditions.

    taskLowWaterMark: 1

    serviceToSlotRatio: 1:1

    numUnfinishedTasks: 100

    This means that with 100 unprocessed tasks and a taskLowWaterMark of 1, the SSM will keep 100 slots.

    If the serviceToSlotRatio is set to 1:4, i.e., each service requires 4 slots, the SSM will keep 400 slots.

  1. The low-water mark is configured in the application profile, Consumer section.

    For example:

    <Consumer applicationName="MyApplication" consumerId="/consumer" taskHighWaterMark="1.0" taskLowWaterMark="0.0" preStartApplication="false" numOfSlotsForPreloadedServices="1"/>
  2. Re-register the application with the soamreg command. (If you prefer, you may perform these steps using the Platform Management Console to export and import the application profile.)