In this section:

Overview

This feature aims to allow the creation of a Linux cgroup at SBC instantiation time that will have dedicated CPUs and a maximum memory cap. This allows the user to install and use their third-party applications on Cloud SWe environments without taking resources away from the SBX application.

The configuration template collects the number of CPUs (ThirdPartyCpus) and the maximum amount of memory in MB (ThirdPartyMem) allowed to be used by the applications. These values are then added into the user data as ThirdPartyCpuAlloc and ThirdPartyMemAlloc. 

To use the third-party cgroup, install/run your applications using the runThirdPartyApps.sh script. Refer to Create a Script to Pin third-party software to a particular set of cores in SBC SWe for more details on how to use the runThirdPartyApps.sh script and any limitations. In summary:

  • This script is located in /opt/sonus/sbx/scripts/.
  • If the user does not configure the third-party cgroup, then the script will continue to run the applications in the sig cgroup.

Instance Provisioning

Calculate the number of CPUs and size of memory for your instance, to reach your required call sessions first. Then, add on the desired resources to your instance for third-party provisioning, so they do not end up with fewer sessions than expected.

For example, If the required sessions are achieved with 4 CPUs and 8GB Memory, and they want 2 CPUs and 2048MB memory for third-party provisioning, the instance should have a minimum of 6 CPUs and 10GB of memory.

The minimum number of CPUs needed for any third-party provisioning to take place is the number of thirdPartyCpus + 4.

If the instance has less that 4 CPUs when thirdPartyCpuAlloc is subtracted or when thirdPartyMemAlloc is not equal to 0, the SBX application will fail to start.

The values are added into the calculation when changing the active profile. If this means there is not enough memory or not enough CPUs on the instance, the changes will fail to commit.

Constraints

  • The user data values ThirdPartyMemAlloc and ThirdPartyCpuAlloc are optional. If they do not exist in the user data, the cgroup is not created.
  • ThirdPartyMemAlloc and ThirdPartyCpuAlloc are dependent on each other. If only one exists in the instance’s user data, the SBX application will fail to start.
  • The ThirdPartyMemAlloc must be a value between 0-4096. Otherwise, the application will fail to start.
  • The ThirdPartyCpuAlloc must be a value between 0-4. Otherwise, the application will fail to start.
  • A third-party CPU setting of more than 2 vCPU is not supported with p3.2xlarge instances due to the vCPU requirement of the Standard_GPU_Profile.

Template Updates

  • Addition of label ‘Third Party Application Provisioning’
  • Addition of parameters: ThirdPartyCpus and ThirdPartyMem
    • Both of type number
    • Both have default 0
    • ThirdPartyCpus has a range of: (min: 0, max: 4)
    • ThirdPartyMem has a range of: (min: 0, max: 4096)
  • In the user_data:
    • third_Party_Cpus gets ThirdPartyCpus parameter
    • third_Party_Mem gets ThirdPartyMem parameter

These two parameters are used for writing to userData.json with ThirdPartyCpuAlloc and ThirdPartyMemAlloc respectively.