Re: CPU weight of application


Eric Malm <emalm@...>
 

Hi, Sam,

No, the LRP generated for the CF app will have its CPU weight set
proportionally to its desired memory. Keep in mind that for an app running
on Linux, the CPU weight corresponds to the cpu.shares cgroup, which
enforces a relative amount of CPU usage amongst processes only if there is
contention over CPU. If nothing else is competing for CPU on the VM, your
process can use as much as it is capable of using.

Thanks,
Eric, CF Runtime Diego PM

On Sun, Apr 10, 2016 at 8:19 PM, Sam Dai <sam.dai(a)servicemax.com> wrote:

Hello,
According to code
https://github.com/cloudfoundry-incubator/nsync/blob/01a624d23cb683f35c88c4160205c4ad880faaf0/recipebuilder/recipe_builder.go#L72-L84
, diego apps scale the number of allocated cpu shares linearly with the
amount of memory when allocated memory is > 256MB and < 8192MB, is there
a way to allocate extra cpu to an app that happens to need less memory?

Thanks,
Sam

Join {cf-dev@lists.cloudfoundry.org to automatically receive all group messages.