# Docker --cpu option with hyperthreading

**URL:** <https://forums.docker.com/t/docker-cpu-option-with-hyperthreading/112664>\
**Category:** General\
**Tags:** docker\
**Created:** [July 16, 2021, 9:32pm UTC](https://forums.docker.com/t/docker-cpu-option-with-hyperthreading/112664 "2021-07-16T21:32:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![erik96](https://avatars.discourse-cdn.com/v4/letter/e/ecccb3/32.png) [@erik96](https://forums.docker.com/u/erik96)\
**Post date:** [July 16, 2021, 9:32pm UTC](https://forums.docker.com/t/docker-cpu-option-with-hyperthreading/112664/1 "2021-07-16T21:32:56Z")

</div>

Hello, i am deploying an application in a docker container and set the --cpu option to 4.

However i am not sure, what that exactly does mean for me?  
I have an eight-core processor with hyperthreading so i have 16 threads available.  
Is the application only capable of using 4 of those threads (and therefore 2 cpu-cores) or 4 (of the 8) processor-cores and therefore 8 of those threads?

I couldn’t really get the answer in the docs, because what exactly the term ‘cpu’ is defined as in this context: a real physical cpu-core or a virtual thread (also this variies a lot of linux commands).  
PS: I use docker on linux!

I would be glad about any help, thanks in advance! 🙂

---

<div class="post-metadata">

**Author:** ![meyay](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/meyay/32/34000_2.png) [@meyay](https://forums.docker.com/u/meyay)\
**Post date:** [July 17, 2021, 7:48pm UTC](https://forums.docker.com/t/docker-cpu-option-with-hyperthreading/112664/2 "2021-07-17T19:48:15Z")

</div>

It should be logical cpu’s (core+ht).

I am sure you stumbled across [Runtime options with Memory, CPUs, and GPUs | Docker Documentation](https://docs.docker.com/config/containers/resource_constraints/#configure-the-default-cfs-scheduler)

---

<div class="post-metadata">

**Author:** ![erik96](https://avatars.discourse-cdn.com/v4/letter/e/ecccb3/32.png) [@erik96](https://forums.docker.com/u/erik96)\
**Post date:** [July 17, 2021, 9:03pm UTC](https://forums.docker.com/t/docker-cpu-option-with-hyperthreading/112664/3 "2021-07-17T21:03:43Z")

</div>

Thanks for the answer.

Yeah i already read trough the documentation however i was not sure what the used definition for ‘cpu’ there was (logical cpu’s or physical cpu-cores?),  
especially because in the option `--cpuset-cpus` the description says ‘cpu’s or cpu-cores’ which is not the same at all with hyperthreading.
