Docker –cpus use cpu cores or processors to limit usage?

Docker have –cpus to constrain CPU usage for container.

According to docs, it will

Specify how much of the available CPU resources a container can use. For instance, if the host machine has two CPUs and you set –cpus=”1.5″, the container is guaranteed at most one and a half of the CPUs.

However, I run machine:

# cat /proc/cpuinfo | grep "cpu cores" | tail -n 1
8
# cat /proc/cpuinfo | grep "processor" | wc -l
16

Does it make sense to set –cpus=7.5 if I want to set 50% limit to container? Or it will be 94%?

I don’t see clear answer neither in Docker documentation nor in cgroups manual.

I saw detailed explanation of differences between physical cpu and virtual cpu and cores here, but it don’t clarify what I should use for my limits with Docker.

Source: StackOverflow