How limit the usage of cup and memory when use drone build

When a build process happening,the cup and memery all ways 100% load,how to prevent this,can we do some limit via drone?


If you are using kubernetes runner you can set limit as below:

And for docker runner you can use something like below:
kind: pipeline
type: docker
name: default

- name: build
  image: golang
  detach: false
  failure: ignore
  mem_limit: 1GiB
  memswap_limit: 2GiB

Harness support

Are you sure drone allow this?

Why there is a error with vscode

And I did a test,using

  mem_limit: 1GiB
  memswap_limit: 2GiB

seems no effect.