Enabling a service to use GPUs

By default, your IBM® Spectrum Conductor service will use CPUs for processing. You can improve IBM Spectrum Conductor performance of by offloading certain processing functions from your processor (CPU) to a graphics processing unit (GPU). A graphics processing unit is designed to optimize parallel processing. An NVIDIA GPU can potentially have thousands of cores that can run the same instruction at the same time, such as operating on each pixel within an image. By comparison, a CPU has a few cores that are ideal for serial processing, carrying out different instructions sequentially. You can use GPUs if your cluster include hosts that have GPUs. Your service can use GPUs exclusively, or in addition to CPUs.

Before you begin

This task involves updating your service profile, which requires cluster administrator permissions.

Specific hardware and software requirements apply for your GPUs. Ensure you have configured the hosts with GPUs appropriately for your cluster before completing this task.

About this task

You can configure a service to use GPUs (instead of, or in addition to, CPU slots) by updating the IBM Spectrum Conductor service profile, or by using the /services API within Resource orchestrator RESTful API. This topic provides steps for updating the service profile.

Once configured, the service uses the GPUs configured for your cluster. You can then view the GPU settings for your service using the egosh service view command.

Procedure

  1. From the cluster management console Dashboard, select System & Services > EGO Services > Service Profiles.

    The System Services page displays.

  2. In your consumer tree, navigate to the location of the service you want to update.

    You can only update services from a leaf location. If your consumer has any sub-consumers, then it is not a leaf.

  3. For the service you want to update, click Actions > Open Profile.

    The Service Profile dialog displays showing the configured parameters for the service.

  4. Click Table Preferences and select the boxes to add the corresponding information columns to the table.
  5. Add the UseGPU parameter to the service profile by selecting sc:ServiceDefinition > Actions > Insert "UseGPU", and specify true in the Value field.

    This setting will use the GPUs configured for your cluster for the service.

  6. To specify that the GPUs on the machine are in exclusive mode (versus default mode, which is sharable), add the ExclusiveGPU parameter to the service profile by selecting sc:ServiceDefinition > Actions > Insert "ExclusiveGPU", and specify true in the Value field.
  7. Set the number of GPUs to use for the service, by specifying a value for the InstanceToSlotRatio parameter in the service profile, in the format of 1:N where N is the number of GPUs for each service. (If the InstanceToSlotRatio parameter does not exist in your service profile, add it by selecting sc:ServiceDefinition > Actions > Insert "InstanceToSlotRatio".
  8. Click Save to save your GPU settings for the service profile.
    Tip: If the service was not in DEFINED state, the service must be stopped to apply your changes. If you prompted to stop the service, click OK.
  9. Click Close and confirm your changes.
  10. Verify your GPU service settings by viewing your service profile:
    egosh servie view service_name

    For details on using this command, see service.