-2

Physical Server Setup:

OS: Ubuntu 16.04

RAM: 384GB

CPU: Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz with 2 sockets, 8 cores per socket, and 2 threads per core, so the system reports it has 32 processors.


I am using Wok/Kimchi to manage my system.

At the moment I have 3 virtual machines running with 32GB of ram assigned to each and two of them have only 1 core assigned and the other has 4 cores assigned, so a total of 6 cores are allocated to VMs.

They seem to be running just fine but occasionally will hang for a second or two when I am using a putty terminal for example.

I am trying to start a 4th VM with only 1 core and 32GB of Ram but it's performance is so bad that just booting up takes several minutes and then even trying to type a command in a terminal is nearly impossible as the VM is so sluggish.

The physical server is running two multithreaded Python scripts that use up to 10 cores, but otherwise it is not doing anything other than running the VMs.

Does anyone have advice on how to allocate resources better? I think I should easily be able to run several more VMs.

  • What is the server hardware? Manufacturer/model? And 378GB of RAM? That's a very odd number. Are you sure that's how much is installed? Which RAM slots are populated, and with what RAM? – Michael Hampton May 14 at 4:41
  • 1
    Scientific method is your friend. Install monitoring, gather data, analyze data, take steps as appropriate. – Iain May 14 at 6:57
  • 384 GB of ram. HP Proliant DL380P G8. My question really is whether I should be assigning more than 1 core to a VM. I found all sorts of response on forums that ranged from never assign more than 1 core to a VM to assign all your cores to all your VMs. I figured it shouldn't be so complicated, just allocate what you need and not more than you have. But clearly this is not the case. Do you have recommendations on monitoring software? Using standard Linux tools usage of processors, memory, IO all look to be at the low end so I don't understand why I am having horrible performance. – cuxcrider May 14 at 17:32
  • Well I see this is "off topic" but I fixed the problem...I discovered when I assigned 4 virtual cores using Wok/Kimchi, it defaults to actually assigning 4 sockets! You can manually set the topology however so I set 1 socket, 2 cores, and 2 threads and now the VMs run much smoother. – cuxcrider May 15 at 4:44
  • @cuxcrider Please consider formatting your questions better. It's hard to a read a never ending sentence. Indenting, Bullet Points, Bold all exist for a reason. Glad you got it fixed tho! PS: I did read that RedHat recommends 1vCPU for each socket, but if you can tell the difference then use what works. – FreeSoftwareServers May 22 at 5:07
1

You should give each VM enough virtual CPUs to run its workload. One is usually wrong, and all is also usually wrong. What "enough" is depends on what the VM will be doing. Keep in mind that with most workloads, CPU is only used in bursts, so it's very likely that you will overcommit CPU, and that's likely OK.

As for virtual CPU topology, there's no need to worry about whether the virtual CPUs are presented as cores or sockets, unless you are running some proprietary software with a license that cares about the difference between cores and sockets.

  • 1
    Hey, look, it's a downvote with no apparent reason. You obviously aren't required to explain it, but it's pretty useless if you don't. – Michael Hampton May 22 at 6:03
  • RHEL Recommends 1 Socket/1Thread, just FYI. access.redhat.com/documentation/en-us/red_hat_enterprise_linux/… – FreeSoftwareServers May 23 at 0:19
  • @FreeSoftwareServers thank you for that link. RHEL's recommended topology of using multiple sockets but only 1 core and 1 thread is not intuitive, at least not to me. I have not tried setting my virtual machines up with that topology so I'll give it a try. – cuxcrider May 23 at 6:07
  • Yeah I would be lying if I said I used that topology. I feel like OS or software is optimized for single CPU setups and it doesn't make a big difference so I tend to use a single CPU with multiple cores and threads – FreeSoftwareServers May 23 at 6:20
  • 1
    Actually that topology is the default. After seeing that that advice from RHEL is still current, I'm even further inclined to recommend not changing it (without a really good reason, such as application licensing). – Michael Hampton May 23 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.