Skip to main content

CPU

CPU consumption is billed per second based on the amount of CPU time actually consumed by pipeline job and its environment, except for the exclusive cores if you requested them for your job (see below). Consumed vCPU-seconds are deducted from the available CPU time in the chosen Resource Package. Once the package is exhausted, additional CPU usage incurs per-second charges based on the specific package rate.

By vCPU-second, we refer to one second of processing time on a single hyper-thread of AMD EPYC Gen 2 or higher.

Pipeline jobs are allocated with shared CPU cores by default. However, Business and Enterprise packages offer the option to request exclusive CPU cores. If exclusive cores are selected, they are billed based on the requested amount, irrespective of the actual CPU consumption.

During specific mathematical calculations, performance may drop on shared CPU cores due to intensive L3 cache usage. To address this, Puzl provides the option to allocate exclusive CPU cores for enhanced and consistent performance of certain pipeline jobs. Opting for exclusive cores guarantees:

  • Dedicated Usage: The cores are reserved for your pipeline job alone, ensuring no other jobs or processes can access these cores or their L1-L3 caches.
  • Optimized Allocation: The cores are allocated on the same CPU socket, minimizing cross-socket traffic and maximizing efficiency, which might be especially important when using GPUs.

To request exclusive cores, you need:

  1. Set spec.pipelines.resources.dropContainerResourceLimits in your GitLabRunnerClaim resource to false.
  2. Set the CPU and memory request variables with the same values as their corresponding limit variables in your .gitlab-ci.yml:
variables:
  # In this set of variables, you are requesting the amount of resources you need for your build container. 
  # https://docs.gitlab.com/runner/executors/kubernetes.html#overwrite-container-resources
  KUBERNETES_CPU_REQUEST: "3"
  KUBERNETES_CPU_LIMIT: "3"
  KUBERNETES_MEMORY_REQUEST: "8Gi"
  KUBERNETES_MEMORY_LIMIT: "8Gi"

  # Setting 1 CPU and 1 GB of memory for helper container is enough in the most cases.
  KUBERNETES_HELPER_CPU_REQUEST: "1"
  KUBERNETES_HELPER_CPU_LIMIT: "1"
  KUBERNETES_HELPER_MEMORY_REQUEST: "1Gi"
  KUBERNETES_HELPER_MEMORY_LIMIT: "1Gi"

  # You cannot designate resources for each specific service. 
  # Please, avoid setting excessively low values for memory and CPU for services, 
  # as doing so can result in performance issues with caching or out-of-memory errors due to insufficient resources.
  # Find more information about services here: https://docs.gitlab.com/ee/ci/services/
  KUBERNETES_SERVICE_CPU_REQUEST: "2"
  KUBERNETES_SERVICE_CPU_LIMIT: "2"
  KUBERNETES_SERVICE_MEMORY_REQUEST: "4Gi"
  KUBERNETES_SERVICE_MEMORY_LIMIT: "4Gi"

You can specify the resource allocations above for any individual job.

Notice

To allocate your pipeline job with exclusive CPU cores, you must always request both CPU and memory resources in the pipeline job config.