<p>I don't really understand this after reading through <a href="https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-cpu" rel="noreferrer">the document</a>. Some use a term like "CPU", but some use "core".</p>

<p>I am running Kubernetes in my laptop for testing purpose. My laptop has one CPU (2.2&nbsp;GHz) and four cores.</p>

<p>If I want to set the CPU request/limit for pod, should the maximum resource that I have be 1000m or 4000m?</p>

<p>What is the difference (CPU vs. core) here in a Kubernetes context?</p>

<p>To clarify what's described <a href="https://kubernetes.io/docs/tasks/configure-pod-container/assign-cpu-resource/" rel="noreferrer">here</a> in the Kubernetes context, 1 CPU is the same as a core (Also more information <a href="https://kubernetes.io/docs/tasks/configure-pod-container/assign-cpu-resource/#cpu-units" rel="noreferrer">here</a>).</p>
<pre><code>1000m (milicores) = 1 core = 1 vCPU = 1 AWS vCPU = 1 GCP Core.
100m (milicores) = 0.1 core = 0.1 vCPU = 0.1 AWS vCPU = 0.1 GCP Core.
</code></pre>
<p>For example, an Intel Core i7-6700 has four cores, but it has Hyperthreading which doubles what the system sees in terms of cores. So in essence, it will show up in Kubernetes as:</p>
<pre><code>8000m = 8 cores = 8 vCPUs
</code></pre>
<p>Some extra information: These resources are managed by the kube-scheduler using the <a href="https://en.wikipedia.org/wiki/Completely_Fair_Scheduler" rel="noreferrer">Completely Fair Scheduler</a> (CFS), and there are no guarantees in terms of overruns within the same machine and your pod may be moved around.</p>
<p>If you'd like to have stronger guarantees, you might consider the <code>--cpu-manager-policy=static</code> (CPU Manager) option in the kubelet. More information is <a href="https://kubernetes.io/docs/tasks/administer-cluster/cpu-management-policies/#cpu-management-policies" rel="noreferrer">here</a> and <a href="https://kubernetes.io/blog/2018/07/24/feature-highlight-cpu-manager/" rel="noreferrer">here</a>.</p>
<p>For more details on what your system sees as a CPU (and number of CPUs) on a Linux system you can see how many vCPUs you have by running <code>cat /proc/cpuinfo</code>.</p>
