cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

CPU cores per socket setting not functional

Open DagSonsteboSB opened this issue 8 years ago • 28 comments

ISSUE TYPE
  • Bug Report
  • Enhancement Request
COMPONENT NAME
  • Cores per socket setting in user_vm_details / vm_template_details table when using XenServer hypervisor
CLOUDSTACK VERSION
  • CloudStack version 4.9.2
  • Not attempted reproduced in other versions but assumption is issue is still present in 4.11.x
CONFIGURATION, OS / ENVIRONMENT
  • CloudStack 4.9.2
  • XenServer 6.2 and 7.0 - fully licensed with Citrix licensing
  • Advanced zone
SUMMARY
  • Even with cpu.corespersocket (or cpuid.coresPerSocket as suggested in some mailing list threads) specified CloudStack will ignore this setting.
  • All ACS specifications for cores and sockets will translate to "sockets" in XenServer
  • Overall problem is some VMs when given a higher core count does not see all it's CPU cores/sockets.
STEPS TO REPRODUCE
  • Create a VM with cpu count 4 cores
  • Add entry for cpu.corespersocket=2 in user_vm_details
  • Start VM
  • Check allocation in XenCentre
EXPECTED RESULTS
  • VM with 2 sockets and 2 cores per socket
ACTUAL RESULTS
  • VM with 4 sockets

DagSonsteboSB avatar Apr 19 '18 12:04 DagSonsteboSB

Tentatively marked for 4.11.1.0 milestone, for testing this we'll require a pro version of XenServer. @DagSonsteboSB @PaulAngus do we have a test env to test a fix against?

yadvr avatar May 01 '18 14:05 yadvr

@PaulAngus is this still an issue? With XCP-ng, is a XenServer Pro license still required? Could the default behavior be to specify cores rather than sockets?

bdonnahue avatar Oct 19 '18 16:10 bdonnahue

@bdonnahue we'll need to test this, if you've a XCP-ng setup, can you test?

yadvr avatar Oct 19 '18 17:10 yadvr

@rhtyd I am happy to test but I want to clarify some things and ask some dumb questions. Are you on the slack channel?

bdonnahue avatar Oct 19 '18 17:10 bdonnahue

@rhtyd any updates? Building cloudstack from source was more complicated that I thought. I have not been able to make any progress here

bdonnahue avatar Oct 28 '18 17:10 bdonnahue

Let's revisit this after 4.11.2.0 gets released. /cc @DagSonsteboSB @PaulAngus

yadvr avatar Oct 29 '18 06:10 yadvr

Sounds good, is there a scheduled release date @rhtyd ?

bdonnahue avatar Oct 29 '18 18:10 bdonnahue

@bdonnahue there is no strict date however we were aiming for late-oct, mid-nov; but we have had blockers/bugs because of which we're at RC4.

yadvr avatar Nov 12 '18 05:11 yadvr

@rhtyd ok. I will reach out again in a few weeks to see how things are going. Thanks for the help on this!

bdonnahue avatar Nov 14 '18 20:11 bdonnahue

Still exists for 4.11.2 with XCP-NG 7.4 - parameter is ignored, and it's always 4 sockets.

andrijapanicsb avatar Jan 24 '19 18:01 andrijapanicsb

Confirmed this issue with Xenserver 7 and Cloudstack 4.11.3

       nameLabel: Async.VM.start_on
 nameDescription:

allowedOperations: [] currentOperations: {} created: Mon Feb 18 10:11:51 AEDT 2019 finished: Mon Feb 18 10:11:51 AEDT 2019 status: failure residentOn: com.xensource.xenapi.Host@904b9a65 progress: 1.0 type: result: errorInfo: [INVALID_VALUE, platform:cores-per-socket, VCPUs_max must be a multiple of this field] otherConfig: {} subtaskOf: com.xensource.xenapi.Task@aaf13f6f subtasks: []

asender avatar Feb 17 '19 23:02 asender

We have this working with: XS 6.5 and CS 4.8 XS 6.5 and CS 4.11

Given the OP said they had the issue with 6.2, I am wondering if you're just missing something?

To get it working:

  • shutdown the VM
  • delete the 'platform' row for this VM ID in user_vm_details
  • create a cpu.corespersocket for this VM ID in user_vm_details
  • boot the VM from CS
  • the 'platform' row is rebuilt from XS
  • cores will be whatever you set it to

Obviously it would be much nicer if CS just supported this, but it is possible to get it working.

ToonGeneral avatar Feb 28 '19 19:02 ToonGeneral

Hey, thanks for sharing that info about the workaround while we wait for a better solution.

bdonnahue avatar Mar 15 '19 01:03 bdonnahue

We have this working with: XS 6.5 and CS 4.8 XS 6.5 and CS 4.11 Given the OP said they had the issue with 6.2, I am wondering if you're just missing something? To get it working:

  • shutdown the VM
  • delete the 'platform' row for this VM ID in user_vm_details
  • create a cpu.corespersocket for this VM ID in user_vm_details
  • boot the VM from CS
  • the 'platform' row is rebuilt from XS
  • cores will be whatever you set it to

Obviously it would be much nicer if CS just supported this, but it is possible to get it working.

Hi ToonGeneral, can you share the commands in the database? I'm not sure if I'm doing the DB Update correct ;)

ok, got it: select * from user_vm_details where vm_id= \g delete from user_vm_details where id=

set @vmuuid='66bec96f-4694-463e-a920-1d99ef29f23d'; set @vmcores='4' insert into cloud.user_vm_details (vm_id,name, value) (select i.id,'cpu.corespersocket',@vmcores from cloud.vm_instance i where i.uuid=@vmuuid);

mschaepers avatar Mar 20 '19 02:03 mschaepers

okay, this seems not to survive a server restart (with shutdown). After powering on the server is keeps changing back to the original behaviour

mschaepers avatar Mar 21 '19 23:03 mschaepers

Confirmed, it does not support reboots

bdonnahue avatar Mar 23 '19 20:03 bdonnahue

Not sure what you guys are doing, but it works fine for us. Survives a reboot through CS fine.

@mschaepers your SQL looks correct, except don't delete * from user_vm_details. You only need to delete the platform value. I don't know if that's what is causing your issue.

I can also confirm this is working using the new UI controls in 4.11. The VM needs to be off and you can then delete the platform entry and add cpu.corespersocket through the UI. Still works on reboot.

ToonGeneral avatar Mar 24 '19 20:03 ToonGeneral

My original post is missing in the second statement that I delete just platform

After modifying it I do see the new platform value with the correct cores. But as soon as the machine gets turned off a new platform value (with new ID) get’s written back to SQL.

I will try to check if the results when adding it through the UI. Just wondering if something from the template gets inherited?


Von: ToonGeneral [email protected] Datum: 24. März 2019 um 21:22:24 MEZ Bis: apache/cloudstack [email protected] Cc: Mauricio Schäpers [email protected], Mention [email protected] Betreff: Re: [apache/cloudstack] CPU cores per socket setting not functional (#2583)

Not sure what you guys are doing, but it works fine for us. Survives a reboot through CS fine.

@mschaepershttps://github.com/mschaepers your SQL looks correct, except don't delete * from user_vm_details. You only need to delete the platform value. I don't know if that's what is causing your issue.

I can also confirm this is working using the new UI controls in 4.11. The VM needs to be off and you can then delete the platform entry and add cpu.corespersocket through the UI. Still works on reboot.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/apache/cloudstack/issues/2583#issuecomment-475996367, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AVEldcqlylTRYwrSG2uU0n5xsXLS2KPMks5vZ98RgaJpZM4Tbrsa.

mschaepers avatar Mar 24 '19 21:03 mschaepers

I’m using a fork of Cloudstack. Just to be sure that we are taking about the same, which UI controls you are talking about exactly? Can you share a screenshot?


Von: ToonGeneral [email protected] Datum: 24. März 2019 um 21:22:24 MEZ Bis: apache/cloudstack [email protected] Cc: Mauricio Schäpers [email protected], Mention [email protected] Betreff: Re: [apache/cloudstack] CPU cores per socket setting not functional (#2583)

Not sure what you guys are doing, but it works fine for us. Survives a reboot through CS fine.

@mschaepershttps://github.com/mschaepers your SQL looks correct, except don't delete * from user_vm_details. You only need to delete the platform value. I don't know if that's what is causing your issue.

I can also confirm this is working using the new UI controls in 4.11. The VM needs to be off and you can then delete the platform entry and add cpu.corespersocket through the UI. Still works on reboot.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/apache/cloudstack/issues/2583#issuecomment-475996367, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AVEldcqlylTRYwrSG2uU0n5xsXLS2KPMks5vZ98RgaJpZM4Tbrsa.

mschaepers avatar Mar 24 '19 21:03 mschaepers

sorry @mschaepers just don't get the same symptoms. We reboot instances all the time and they don't lose the setting.

CS 4.11 interface: image

ToonGeneral avatar Mar 24 '19 23:03 ToonGeneral