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 Core/Threading Usage

Featured Replies

Hello All, 

 

My question is really about what the docker is allowed to utilize as far as CPU cores are concerned. 

 

I have a running SQL Server in a container. I am currently running a fairly intensive process within SQL.  I would expect the CPU of the container to be near 100%.  My problem is that it appears to only be using one core of the host at a time.

 

image.png.baaefcef52271249aa87b3da9691bbaa.png

 

I have edited the CPU pinning within the Docker Config (tried All On,  All On except 0,1), but get the same result.  To be clear, I want to allocate as much CPU to my SQL Server as possible.  The version of SQL server that I am using within the container does allow multi-core usage.

 

Any help would be very much appreciated!

 

20 hours ago, Phrendo said:

I have edited the CPU pinning within the Docker Config (tried All On,  All On except 0,1), but get the same result.  To be clear, I want to allocate as much CPU to my SQL Server as possible.  The version of SQL server that I am using within the container does allow multi-core usage.

Are you running VM's?  Have you isolated cores to the VM's?  Best way to give as much CPU to any given container is not not pin it to anything at all.

 

Now, if you've isolated CPU cores for VMs, then the containers will only run on the non-isolated cores, and if you try and pin a container to multiple isolated cores then it will only ever run on the lowest numbered one.

  • Author

Thanks for the response @Squid.  Regarding the CPU Pinning, I tried every variation, all while have the VM service turned off.  I did figure it out though.

 

The SQL procedure that I was testing with was forcing a single thread.  Right now, I have the Docker pinned to the 6 cores (no HT) and I am running 6 instances of the SQL procedure.  As you can see in the image below, it is in fact properly using the pinned CPUs (always was).  It is odd that the docker stats command reports a sum of all cores on the CPU % though (this is what was throwing me off earlier).

 

 

image.png.35ae3f259743ad49381bd8899b4b06d3.png

 

 

Again, thank you for the response.

That % is actually quite normal.  By default (and convention in Linux), the percentages reported by each core are added up.   (Note that on the docker page itself (Advanced view), those percentages are normalized to be 0-100, so that page would be showing you 50% - although I can't remember if it takes into consideration the pinned cores or not so it might show 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.