Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Docker CPU usage: change % to be relative to allocated resources

Featured Replies

Currently Docker CPU usage shown on Docker page shows CPU usage as a percentage of the full system core count, unfortunately this behaviour extends to when a container has CPUs pinned, which is where a user has configured the container with less CPU cores (vcpu).

In this example on a 32 vcpu machine, and with a container configured for only 2 vcpu shows a less meaningful fractional percentage.

Instead I propose this usage should be based on actual available vcpu, which is more meaningful for the purpose of monitoring cpu usage. 

 

The below mockup shows current metrics, and the same usage if displayed relative to allocated resources.

image.png.711534f7a80aeb017bff6692cffe0adc.png

Note that container memory usage already displays this relative behaviour.

This machine has 64GB of RAM, but this container is restricted to 8GB though extra parameter --memory=8GB

 

Container CPU pinning for context

image.png.1aaf2cdd4f43b4f5dd52992a5989bbff.png

Yeah, currently the stats are returned directly via "docker stats" divided by the core count in the system (so it's normalized to a max of 100% - docker stats by itself would actually return 0.52*32 = 16.64%) While I don't have any real issues with what you're proposing, one downside is that if you ever add up the percentages they could quite easily exceed 100% 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.