Size your cluster for OpenShift Dev Spaces

Size your cluster by calculating the CPU and memory requirements for the OpenShift Dev Spaces Operator, Dev Workspace Controller, and user workspaces so that your cluster can handle the expected number of concurrent users.

Before you begin

  • You have a planned or existing OpenShift Dev Spaces deployment on OpenShift Container Platform 4.16 or later.
  • You have the devfiles that define the development environments for your users.
  • You have an estimate of the number of concurrent workspaces that your users will run.

About this task

Note:

The following link to an Content from github.com is not included.example devfile is a pointer to material from the upstream community. This material represents the very latest available content and the most recent best practices. These tips have not yet been vetted by Red Hat’s QE department, and they have not yet been proven by a wide user group. Please, use this information cautiously. It is best used for educational and 'developmental' purposes rather than 'production' purposes.

Procedure

  1. Identify the workspace resource requirements from the devfile components section. The following example uses the Content from github.com is not included.Quarkus API example devfile.
    • The tools component of the devfile defines the following requests and limits:
          memoryLimit: 6G
          memoryRequest: 512M
          cpuRequest: 1000m
          cpuLimit: 4000m
    • During workspace startup, an internal che-gateway container is implicitly provisioned with the following requests and limits:
          memoryLimit: 256M
          memoryRequest: 64M
          cpuRequest: 50m
          cpuLimit: 500m
    • Additional memory and CPU are added implicitly for the Visual Studio Code - Open Source ("Code - OSS") editor:
          memoryLimit: 1024M
          memoryRequest: 256M
          cpuRequest: 30m
          cpuLimit: 500m
    • Additional memory and CPU are added implicitly for a JetBrains IDE, for example IntelliJ IDEA Ultimate:
          memoryLimit: 6144M
          memoryRequest: 2048M
          cpuRequest: 1500m
          cpuLimit: 2000m
  2. Calculate the sums of the resources required for each workspace. If you intend to use multiple devfiles, repeat this calculation for every expected devfile.
    Table 1. Workspace requirements for the example devfile in the previous step
    Purpose Pod Container name Memory limit Memory request CPU limit CPU request

    Developer tools

    workspace

    tools

    6 GiB

    512 MiB

    4000 m

    1000 m

    OpenShift Dev Spaces gateway

    workspace

    che-gateway

    256 MiB

    64 MiB

    500 m

    50 m

    Visual Studio Code

    workspace

    tools

    1024 MiB

    256 MiB

    500 m

    30 m

    Total

    7.3 GiB

    832 MiB

    5000 m

    1080 m

  3. Multiply the resources calculated per workspace by the number of workspaces that you expect all of your users to run simultaneously.
  4. Calculate the sums of the requirements for the OpenShift Dev Spaces Operator, Operands, and Dev Workspace Controller.
    Table 2. Default requirements for the OpenShift Dev Spaces Operator, Operands, and Dev Workspace Controller
    Purpose Pod name Container names Memory limit Memory request CPU limit CPU request

    OpenShift Dev Spaces operator

    devspaces-operator

    devspaces-operator

    256 MiB

    64 MiB

    500 m

    100 m

    OpenShift Dev Spaces Server

    devspaces

    devspaces-server

    1 GiB

    512 MiB

    1000 m

    100 m

    OpenShift Dev Spaces Dashboard

    devspaces-dashboard

    devspaces-dashboard

    256 MiB

    32 MiB

    500 m

    100 m

    OpenShift Dev Spaces Gateway

    devspaces-gateway

    traefik

    4 GiB

    128 MiB

    1000 m

    100 m

    OpenShift Dev Spaces Gateway

    devspaces-gateway

    configbump

    256 MiB

    64 MiB

    500 m

    50 m

    OpenShift Dev Spaces Gateway

    devspaces-gateway

    oauth-proxy

    512 MiB

    64 MiB

    500 m

    100 m

    OpenShift Dev Spaces Gateway

    devspaces-gateway

    kube-rbac-proxy

    512 MiB

    64 MiB

    500 m

    100 m

    Plugin registry

    plugin-registry

    plugin-registry

    256 MiB

    32 MiB

    500 m

    100 m

    Dev Workspace Controller Manager

    devworkspace-controller-manager

    devworkspace-controller

    5 GiB

    100 MiB

    3000 m

    250 m

    Dev Workspace Controller Manager

    devworkspace-controller-manager

    kube-rbac-proxy

    N/A

    N/A

    N/A

    N/A

    Dev Workspace Operator Catalog

    devworkspace-operator-catalog

    registry-server

    N/A

    50 MiB

    N/A

    10 m

    Dev Workspace Webhook Server

    devworkspace-webhook-server

    webhook-server

    300 MiB

    20 MiB

    200 m

    100 m

    Dev Workspace Webhook Server

    devworkspace-webhook-server

    kube-rbac-proxy

    N/A

    N/A

    N/A

    N/A

    Total

    12.3 GiB

    1.1 GiB

    8.2

    1.1

  5. Add the workspace resources from step 3 and the operator resources from step 4 to determine total cluster resource requirements.

Results

  • Verify that the total resource requirements account for all OpenShift Dev Spaces Operator components, Dev Workspace Controller components, and the expected number of concurrent workspaces.