Bug 1446372

Summary: Setting guest's emulatorpin cpuset to the union of all vcpus can have negative performance impact
Product: Red Hat OpenStack Reporter: Jean-Tsung Hsiao <jhsiao>
Component: openstack-novaAssignee: Eoghan Glynn <eglynn>
Status: CLOSED DUPLICATE QA Contact: Prasanth Anbalagan <panbalag>
Severity: high Docs Contact:
Priority: unspecified    
Version: 10.0 (Newton)CC: atelang, berrange, dasmith, eglynn, jhsiao, kchamart, sbauza, sferdjao, sgordon, srevivo, vromanso, yrachman
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-28 15:35:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jean-Tsung Hsiao 2017-04-27 18:54:09 UTC
Description of problem: Setting guest's emulatorpin cpuset to the union of all vcpus can have negative performance impact

 <vcpu placement='static'>4</vcpu>
  <cputune>
    <shares>4096</shares>
    <vcpupin vcpu='0' cpuset='3'/>
    <vcpupin vcpu='1' cpuset='15'/>
    <vcpupin vcpu='2' cpuset='1'/>
    <vcpupin vcpu='3' cpuset='13'/>
    <emulatorpin cpuset='1,3,13,15'/>
  </cputune>

This default setting can cause performance impact, especially on 64 bytes zero loss Mpps rate.

Version-Release number of selected component (if applicable):
OSP10 Release


How reproducible:reproducible


Steps to Reproduce:
1. Configure NFV guest.
2. Look at it xml file.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Jean-Tsung Hsiao 2017-04-27 18:57:20 UTC
Is there a way to change this default ?

Comment 2 Sahid Ferdjaoui 2017-04-28 07:56:56 UTC
(In reply to Jean-Tsung Hsiao from comment #0)
> Description of problem: Setting guest's emulatorpin cpuset to the union of
> all vcpus can have negative performance impact
> 
>  <vcpu placement='static'>4</vcpu>
>   <cputune>
>     <shares>4096</shares>
>     <vcpupin vcpu='0' cpuset='3'/>
>     <vcpupin vcpu='1' cpuset='15'/>
>     <vcpupin vcpu='2' cpuset='1'/>
>     <vcpupin vcpu='3' cpuset='13'/>
>     <emulatorpin cpuset='1,3,13,15'/>
>   </cputune>
> 
> This default setting can cause performance impact, especially on 64 bytes
> zero loss Mpps rate.

In RHOS 12 (bug 1298079) a feature has been integrated to isolate emulator threads [0] on a additional physical CPU, is that what you are looking for ?

Also depending of your use-case (I do not know what is a 64 bytes zero loss Mpps rate) the realtime feature provides a mask which isolates emulator threads on a set of CPUs.

[0] https://specs.openstack.org/openstack/nova-specs/specs/ocata/approved/libvirt-emulator-threads-policy.html
[1] https://specs.openstack.org/openstack/nova-specs/specs/mitaka/implemented/libvirt-real-time.html

Comment 3 Jean-Tsung Hsiao 2017-04-28 15:32:12 UTC
(In reply to Sahid Ferdjaoui from comment #2)
> (In reply to Jean-Tsung Hsiao from comment #0)
> > Description of problem: Setting guest's emulatorpin cpuset to the union of
> > all vcpus can have negative performance impact
> > 
> >  <vcpu placement='static'>4</vcpu>
> >   <cputune>
> >     <shares>4096</shares>
> >     <vcpupin vcpu='0' cpuset='3'/>
> >     <vcpupin vcpu='1' cpuset='15'/>
> >     <vcpupin vcpu='2' cpuset='1'/>
> >     <vcpupin vcpu='3' cpuset='13'/>
> >     <emulatorpin cpuset='1,3,13,15'/>
> >   </cputune>
> > 
> > This default setting can cause performance impact, especially on 64 bytes
> > zero loss Mpps rate.
> 
> In RHOS 12 (bug 1298079) a feature has been integrated to isolate emulator
> threads [0] on a additional physical CPU, is that what you are looking for ?

Yes. I'll read bug 1298079.

Thanks!

Jean
> 
> Also depending of your use-case (I do not know what is a 64 bytes zero loss
> Mpps rate) the realtime feature provides a mask which isolates emulator
> threads on a set of CPUs.
> 
> [0]
> https://specs.openstack.org/openstack/nova-specs/specs/ocata/approved/
> libvirt-emulator-threads-policy.html
> [1]
> https://specs.openstack.org/openstack/nova-specs/specs/mitaka/implemented/
> libvirt-real-time.html

Comment 4 Jean-Tsung Hsiao 2017-04-28 15:35:44 UTC
This is a duplicate of bug 1298079.

*** This bug has been marked as a duplicate of bug 1298079 ***