<p>I have to set resource limits for my kubernetes apps, and they use the "milicore" unity "m". </p>

<p>When analyzing my apps in Datadog, I see a unity called M% for CPU usage.</p>

<p>How do I convert 1.5M% to m?</p>

<p>Kubernetes resources: <a href="http://kubernetes.io/docs/user-guide/compute-resources/" rel="nofollow noreferrer">http://kubernetes.io/docs/user-guide/compute-resources/</a></p>

<p><a href="https://i.stack.imgur.com/S6dS8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/S6dS8.png" alt="Datadog usage"></a></p>

<p>This is not correct graph to detect correct resource limit. You graph shows CPU usage of your app in the cluster, but resource limit is per pod (container). We (and you as well) don't know from the graph how many containers were up and running. You can determinate right CPU limit from the container CPU usage graph(s). You will need Datadog-Docker integration:</p>

<blockquote>
  <p>Please be aware that Kubernetes relies on Heapster to report metrics,
  rather than the cgroup file directly. The collection interval for
  Heapster is unknown which can lead to innacurate time-related data,
  such as CPU usage. If you require more precise metrics, we recommend
  using the Datadog-Docker Integration.</p>
</blockquote>

<p>Then it will depends how Datadog measure CPU utilization per container. If container CPU utilization has max 100%, then 100% CPU container utilization ~ 1000m ~ 1. </p>

<p>I recommend you to read how and when cgroup limits CPU - <a href="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/sec-cpu.html" rel="nofollow">https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/sec-cpu.html</a></p>

<p>You will need a deep knowledge to set proper CPU limits. If you don't need to prioritize any container, then IMHO the best practice is to set 1 (<code>resources.requests.cpu</code>) for all your containers - they will have always equal CPU times.</p>
