1

I know it's a common question but I need to ask anyway, just to clarify: How many cores should I assign to my kvm clients?

The host machine has 1 CPU with 8 cores. How many cores should I give the clients if..

  1. I have only one client
  2. I have two clients with equal load
  3. I have two clients with unequal load
  4. I have 8 clients
  5. I have more than 8 clients

My clients mostly run MongoDB+NodeJS, I think multithreading would be an advantage or not? The host cpu is from Intel, I have the hyperthreading (virtual) cores as well..

I'm happy for any experiences and advices, most of the threads concerning this questions end with "use 1 core per client" - but variation 1-3 would end with cores not used at all - or am I wrong

EDIT: I think I need to focus the question more:

  1. Is it a bad idea, to have more cores assigned to clients than the actual host has?
  2. Does more cores for a virtual machine mean more power?
  3. Needs the thread-change / (core change??) for a virtual machine more performance than running it as a single core?

This is not ressource planning - I'm grateful for some kvm advices here as I don't understand the affects in some situations.

chrstnwhlrt
  • 325
  • 6
  • 15
  • 1
    Give them as many as they need. – Michael Hampton Feb 09 '17 at 22:51
  • 1
    But that's the question, what leads to the optimal usage of the host? – chrstnwhlrt Feb 09 '17 at 23:20
  • 1
    Possible duplicate of [Can you help me with my capacity planning?](http://serverfault.com/questions/384686/can-you-help-me-with-my-capacity-planning) –  Feb 09 '17 at 23:21
  • I don't need help with capacity planning, I hoped to get some advice by more experienced kvm admins. The sum of client cores should not be less the number of the (non virtual) host cores or is this wrong? – chrstnwhlrt Feb 09 '17 at 23:29
  • Really, CPUs are probably the cheapest part of the whole setup. Who cares if you only utilize 80% of its capacity rather than 90%? Just give your guests what they need. – Michael Hampton Feb 09 '17 at 23:31
  • Okay but this means more virtual cores == more power in the client?? I used to give my clients 4 cores and run about 8 clients on one host. Is this a bad idea because I use 32 virtual cores on a 8 core host? – chrstnwhlrt Feb 09 '17 at 23:35
  • 'How many cores in the case of a, b, c, d...'.. that is capacity planning. –  Feb 09 '17 at 23:36
  • @yoonix I disagree, this is more a kvm advice and not case related, just trying to understand if I make wrong decisions using it – chrstnwhlrt Feb 09 '17 at 23:37
  • Of course you can have more virtual cores overall than physical cores. That is the whole point of virtualization! – Michael Hampton Feb 09 '17 at 23:51
  • And this doesn't lead to a performance loss because of all the thread changing in the host? I image 8 host cores for 8 vms == 1 core/vm is not more optimal setup than 4 cores/vm? – chrstnwhlrt Feb 09 '17 at 23:54

0 Answers0