Cedar CI Logo

Simple As π

(2 min)

Since Cedar CI provides twice as many cores, as Gitlab.com, for a given rate, we decided to demonstrate the performance difference to emphasize the value. For a simple and direct comparison we created a CI job to calculate π to the first 4,000 digits, repeated 32 times. Each calculation is enough to saturate a CPU core.

We ran the job on Gitlab.com's saas-linux-small-amd64 and Cedar CI's 4-core cedarci-4-core since they're the same price. The job definition is as follows.

benchmark:
  image: alpine
  script:
    - apk add bc parallel
    - |
      calculate_pi='echo "scale=4000; a(1)*4" | bc -l'
      seq -w 1 32 \
        | parallel -N 1 "${calculate_pi}"' > /dev/null' \
        ' && echo $(date +%H:%M:%S) [{1}] calculated π to 4000 digits'
      sh -c "${calculate_pi}"
  parallel:
    matrix:
      - TAG: saas-linux-small-amd64
      - TAG: cedarci-4-core
  tags: [ $TAG ]

Result

The CI jobs were executed on Gitlab.com with the following result.

TagDurationTotalCost
saas-linux-small-amd644:414:50$0.048
cedarci-4-core2:142:30$0.025

Not only did Cedar CI's runner reduce the task duration by 52.5%, but the total cost was also reduced by 48.3%. Such a dramatic difference can provide a large benefit when applied across a project or organization, especially when considering the value of fast CI.

Jobs will not always completely saturate the CPU, but even the worst case is the same duration for the same cost. See how fast Cedar CI can make your CI pipelines.