Bug 1434550 - virsh host capabilities shows incorrect number of sockets
Summary: virsh host capabilities shows incorrect number of sockets
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: TRACKER-bugs-affecting-libguestfs
TreeView+ depends on / blocked
 
Reported: 2017-03-21 17:27 UTC by Richard W.M. Jones
Modified: 2018-07-30 14:53 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-28 13:18:54 UTC


Attachments (Terms of Use)
capabilities.xml (20.59 KB, text/plain)
2017-03-22 10:16 UTC, Richard W.M. Jones
no flags Details

Description Richard W.M. Jones 2017-03-21 17:27:00 UTC
Description of problem:

$ sudo virsh capabilities

<capabilities>

  <host>
    <uuid>00000000-0000-0040-8000-408d5caa0fdb</uuid>
    <cpu>
      <arch>x86_64</arch>
      <model>Broadwell</model>
      <vendor>Intel</vendor>
      <topology sockets='1' cores='8' threads='1'/>

However the real host has 2 sockets.

Cores and threads are correct.

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

libvirt-daemon-3.1.0-1.fc27.x86_64

How reproducible:

100%

Steps to Reproduce:
1. See above.

Host is this one:

https://rwmj.wordpress.com/2016/08/31/new-dev-server/

As you can see from the photograph, there are two sockets.

Comment 1 Jiri Denemark 2017-03-21 20:57:30 UTC
Is this a NUMA machine? The number of sockets is counted per NUMA node. It is similar to what virNodeGetInfo returns, just the number of NUMA cells are completely ignored here. Use other parts of the capabilities XML if you want to see the real CPU topology.

Comment 2 Richard W.M. Jones 2017-03-22 10:16:03 UTC
Created attachment 1265346 [details]
capabilities.xml

It is a NUMA machine (in as much as every machine with > 1 sockets
these days is NUMA).  This is a bit unexpected as I'd expect
"sockets" to be the number of sockets.  It does show
<cells num='2'> which I guess refers to NUMA cells.

Full capabilities XML attached.

Comment 3 srwx4096 2017-03-28 13:12:02 UTC
Hi Richard,

I am new here. It seems to me it's a design decision when it was implemented, it maybe a design flaw as we see it today. 

I am simply practicing to contribute some code. Do we need to actually fix it or leave as it is?

Dan

Comment 4 Peter Krempa 2017-03-28 13:18:54 UTC
As Jirka said, this was a wrong decision originally and it can't be changed now.

If you are unsure how to aggregate data from the topology XML, you can check out libvirt-python.git/examples/topology.py


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