How can I configure CPU core allocation in docker-compose v3?

안녕하세요.
docker-compose는 V3부터 deploy를 지원하지 않아서 실행 시 전체 cpu 자원의 50%만 사용하네요.
혹시 전체 컴퓨터 자원 사용량을 임의로 설정할 방법이 있을까요?
미리 감사드립니다.

Hi,

I found that my docker environment only utilize 50% of all the CPU cores.
Adding ‘deploy’ key-value pairs to yaml & executing docker-compose with compatibility option does not work.

deploy:
    resources:
        limits:
            cpus: '<Core allocation>'
            memory: '<Memory Allocation>'

docker-compose --compatibility -f ./Server/docker-compose.yaml up -d

Is there any way to utilize most of my computer resources?
Thanks in advance.

docker container ls
docker update --cpuset-cpus=12 ID값

이걸로 컨테이너에 cpu를 할당하는 것과 별개의 이야기일까요?

1 Like

이건 기동 후 업데이트하는 방법인가 보군요.
그런데 이걸 실행하니 멀티코어 스크립트 자체가 동작하지 않고 싱글코어로만 동작하네요. ^^;
팁 감사합니다.