Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output CPU Entitlement metrics rather than the old CPU metric #2812

Closed
acrmp opened this issue Mar 15, 2024 · 14 comments
Closed

Output CPU Entitlement metrics rather than the old CPU metric #2812

acrmp opened this issue Mar 15, 2024 · 14 comments

Comments

@acrmp
Copy link
Member

acrmp commented Mar 15, 2024

What's the user value of this feature request?

Currently the cf CLI displays a CPU metric which is difficult to reason about. See #1194 for background here.

Instead we'd like the cf CLI to show CPU Entitlement usage which is more useful.

Who is the functionality for?

End users of the cf CLI.

How often will this functionality be used by the user?

Frequently. We would expect the CPU Entitlement usage stat to be presented when cf app is run or following cf push (as currently).

Who else is affected by the change?

This is potentially a breaking change dependent on whether this is implemented by replacing the existing CPU column or adding an additional column.

Is your feature request related to a problem? Please describe.

Developers find it difficult to reason about their application use of CPU without knowledge of the underlying platform.

Describe the solution you'd like

Modify the cf CLI to output CPU Entitlement in place of the old CPU metric for environments that expose the CPU Entitlement process stat.

     state     since                  cpu entitlement   memory        disk           logging       details
#0   running   2024-02-10T00:30:38Z   5.0%              47.7M of 1G   129.6M of 1G   0/s of 16K/s
#1   running   2024-02-12T18:17:49Z   5.0%              47.7M of 1G   129.6M of 1G   0/s of 16K/s

For environments that do not expose the CPU Entitlement information the cf CLI would continue to show the existing output.

Describe alternatives you've considered

Adding an additional column towards the end of the column output would be more backwards compatible but potentially confusing:

     state     since                  cpu    memory        disk           logging        cpu entitlement   details
#0   running   2024-02-10T00:30:38Z   0.2%   47.7M of 1G   129.6M of 1G   0/s of 16K/s   5.0%
#1   running   2024-02-12T18:17:49Z   0.1%   47.3M of 1G   129.6M of 1G   0/s of 16K/s   2.5%

Additional context

cloudfoundry/diego-release#897
cloudfoundry/cloud_controller_ng#3641

There was some great work done to emit absolute usage and entitlement metrics earlier but these were not directly consumable via the core cf CLI.

https://github.com/cloudfoundry/cpu-entitlement-plugin

@Benjamintf1
Copy link
Member

If we go with the initial proposed option, I think we should consider giving the user a compatibility flag (IE. USE_CPU_USAGE=true) to use cpu usage regardless of whatever capi returns.

@ctlong
Copy link
Member

ctlong commented Apr 2, 2024

Created #2840 to add CPU Entitlement to the cf CLI v8 in a backwards-compatible manner, e.g. add it to the end of the app process table (before details).

@lukas-becker0
Copy link

So which cli and server versions do we need to use to see the cpu entitlement metrics ?

@ctlong
Copy link
Member

ctlong commented May 22, 2024

So which cli and server versions do we need to use to see the cpu entitlement metrics ?

No version of the cf CLI has been released yet with these changes. The next versions of the cf CLI v8 and v9 (when it is released) will have a cpu entitlement column in the table. Its entry may be empty though if the CAPI that responds doesn't support the metric.

CAPI v1.175.0 is the first to support CPU Entitlement metrics.

@jossy
Copy link

jossy commented Jun 3, 2024

@ctlong Is there any timeline for the next CLI release? We are eager to get started with the CPU entitlements metric, but without CLI support it's tricky to roll that out...

@ctlong
Copy link
Member

ctlong commented Jun 3, 2024

@ctlong Is there any timeline for the next CLI release? We are eager to get started with the CPU entitlements metric, but without CLI support it's tricky to roll that out...

^ @a-b @tcdowney do you have a timeline?

@a-b
Copy link
Member

a-b commented Jun 3, 2024

We're in the final stage of the Cli Bosh release pipeline redesign, which is blocking this release. We expect to release CLI by the end of this week.

@jossy
Copy link

jossy commented Jun 3, 2024

Awesome, thank you!

@jossy
Copy link

jossy commented Jul 1, 2024

@a-b Do you have any updates on when the next version will be released? thx!

@a-b
Copy link
Member

a-b commented Jul 1, 2024

We have most of our infrastructure ready. Very likely this week.

@gururajsh
Copy link
Member

@jossy new CLI version was released last week.

@ctlong
Copy link
Member

ctlong commented Jul 15, 2024

Should this issue be closed as delivered then? Or do folks want to wait until v9 is released with the proposed changes?

@lukas-becker0
Copy link

lukas-becker0 commented Jul 16, 2024

@ctlong but v8 also has support for it ?!

At least I can see it now using cli version 8.7.11+b1b4068.2024-07-09

@ctlong
Copy link
Member

ctlong commented Jul 16, 2024

Right, this proposal resulted in two PRs:

  1. Add cpu entitlement column to the end of the app table in the v8 cf CLI
  2. Replace cpu column with cpu entitlement column in the next major version (v9) of the cf CLI

Both have been merged, but only (1) has been released. (2) is awaiting a v9 cf CLI release

I propose that this issue is now complete, even though there is no v9 cf CLI release yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants