Bug 1534669 - emulator_threads_policy needs improvement when hyper threading is enabled
Summary: emulator_threads_policy needs improvement when hyper threading is enabled
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova
Version: 12.0 (Pike)
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: Upstream M2
: 14.0 (Rocky)
Assignee: Stephen Finucane
QA Contact: Joe H. Rahme
URL:
Whiteboard:
Depends On:
Blocks: 1608105
TreeView+ depends on / blocked
 
Reported: 2018-01-15 17:26 UTC by jianzzha
Modified: 2022-03-13 15:20 UTC (History)
14 users (show)

Fixed In Version: openstack-nova-18.0.0-0.20180710150340.8469fa7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-11 11:48:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
email-thread-with-Ferdjaoui (2.42 KB, text/plain)
2018-01-15 17:26 UTC, jianzzha
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1744965 0 None None None 2018-01-23 16:08:24 UTC
OpenStack gerrit 537363 0 None MERGED Ensure emulator threads are always calculated 2020-01-31 10:42:48 UTC
Red Hat Issue Tracker OSP-13600 0 None None None 2022-03-13 15:20:18 UTC
Red Hat Product Errata RHEA-2019:0045 0 None None None 2019-01-11 11:48:50 UTC

Description jianzzha 2018-01-15 17:26:57 UTC
Created attachment 1381592 [details]
email-thread-with-Ferdjaoui

Description of problem:
When hyper threading is enabled, the way emulator_threads_policy allocates the extra cpu resource for emulator is not optimal.

The instance I use for testing is a 6-vcpu VM; before enable this emulator_threads_policy, I reserve 6 cpu (actually 6 threads since we enable hyper threading) in nova config,
vcpu_pin_set=8,10,12,32,34,36

Now when we enable emulator_threads_policy, in stead of adding one more thread to this vcpu pin list in the nova config, I end up adding two more sibling threads (on the same core)
 vcpu_pin_set=8,10,12,16,32,34,36,40

So I ended up using 2 more threads, but only of them is used for emulator and the other thread is wasted.

Comment 1 Stephen Finucane 2018-01-19 09:54:13 UTC
My first question upon reading this was why don't you just reserve 7 CPUs instead of 8?

  vcpu_pin_set=8,10,12,16,32,34,36

However, upon reading the attached email, it seems that this is broken and returns the following message:

  No valid host was found. There are not enough hosts available.

So configuring vcpu_pin_set to include cores and their sibling works, but not including at least one sibling breaks. Is this correct?

Comment 2 jianzzha 2018-01-19 14:17:23 UTC
(In reply to Stephen Finucane from comment #1)
> My first question upon reading this was why don't you just reserve 7 CPUs
> instead of 8?
> 
>   vcpu_pin_set=8,10,12,16,32,34,36
> 
> However, upon reading the attached email, it seems that this is broken and
> returns the following message:
> 
>   No valid host was found. There are not enough hosts available.
> 
> So configuring vcpu_pin_set to include cores and their sibling works, but
> not including at least one sibling breaks. Is this correct?

Yes. reserving 7 CPUs didn't work for me.

Comment 3 Stephen Finucane 2018-01-25 14:09:17 UTC
There's a patch upstream for this now. It's rather lengthy, but I hope to get it merged sharpish all the same.

Comment 6 Stephen Finucane 2018-04-23 13:42:46 UTC
All of these patches have been merged now.

Comment 12 errata-xmlrpc 2019-01-11 11:48:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2019:0045


Note You need to log in before you can comment on or make changes to this bug.