garden-runc-release icon indicating copy to clipboard operation
garden-runc-release copied to clipboard

Document CPU entitlement

Open gcapizzi opened this issue 3 years ago • 6 comments

The CPU entitlements feature can be quite tricky to understand. We want to document both its behaviour and its implementation.

For the behaviour, we have some good starting points:

Let's also remember to mention the CF CLI plugins!

For the implementation, let's try to describe:

  • how CPU shares work in the kernel
  • how we use nested CPU cgroups to implement throttling

gcapizzi avatar Jun 01 '21 14:06 gcapizzi

Had a read of what needs to be done. Have a rough outline of what the doc should include:

CPU Entitlement and Throttling

CPU entitlements and cpu throttling are two interconnected features in Garden, designed to improve how CPU resources are distributed to applications in Cloud Foundry.

What does this look like for users?

  • overview - maybe just link to video/blog post as they are high level
  • explain the problem - the default cpu metric is innacurate
  • what happens when with spare resources currently
  • what is entitlement
  • how do the spare resources get distributed now

How is it implemented?

Entitlement

  • how we calculate the value
  • what we emmit to loggregator
  • the cpu entitlement plugins
  • mention how to enable it in a deployment
  • explain what entitlement_per_share is and what happens with different values https://www.pivotaltracker.com/story/show/171307969
  • explain what happens when the bad apps are more than the good ones and how we fixed this https://www.pivotaltracker.com/story/show/171050093

Throttling

  • explanation on how CPU shares work https://kernel.googlesource.com/pub/scm/linux/kernel/git/glommer/memcg/+/cpu_stat/Documentation/cgroups/cpu.txt
  • explain good and bad cgroups
  • explain how we move between those cgroups

mnitchev avatar Jul 06 '21 11:07 mnitchev

Runtime tracker story has been generated for this issue: https://www.pivotaltracker.com/story/show/180812792

MarcPaquette avatar Jan 05 '22 16:01 MarcPaquette

Hello @ameowlia and @MarcPaquette. Is this getting worked on? What's the current state? We have it in our backlog so I assume somebody made a commitment to work on this from our end. Is it actionable?

sleepychild avatar Aug 25 '22 07:08 sleepychild

Hi @sleepychild,

This issue is in our icebox at this time, but we don't have any immediate plans to work on this. I can bring it up in IPM next week to discuss.

Thanks

MarcPaquette avatar Aug 25 '22 16:08 MarcPaquette

Hi @MarcPaquette,

There was a discussion between @ameowlia and our PO and they agreed that our team is going to work on this documentation.

mmdacheva avatar Aug 29 '22 08:08 mmdacheva

Hello @ameowlia and @MarcPaquette,

Could you please take a look at the following PRs: https://github.com/cloudfoundry/docs-cf-admin/pull/220 https://github.com/cloudfoundry/docs-loggregator/pull/64

Thank you in advance.

mmdacheva avatar Sep 15 '22 11:09 mmdacheva

Merged!

ameowlia avatar Nov 08 '22 18:11 ameowlia