KVM CPU settings

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

KVM CPU settings

Roshan
Hello Erman,

could you please advise on the correct setting for CPU(CPU_VM).
host2_1.png
host2_2.png
host2_3.png
CPU_VM.png

Thanks,
Roshan
Reply | Threaded
Open this post in threaded view
|

Re: KVM CPU settings

ErmanArslansOracleBlog
Administrator
What is your purpose?
What is your exact question? Please give details.
Reply | Threaded
Open this post in threaded view
|

Re: KVM CPU settings

Roshan
This post was updated on .
My purpose is to optimise cpu performance on the vm so that Oracle performs better. We have a batch job which runs at night and consumes cpu.

Could you please advise on the best value for Virtual sockets, cores per virtual socket and threads per core?

when i set the thread to 2, I see the batch processing time decrease by 1 hour. Can i increase the thread higher than 2 (4 or 8)?

Screenshot_2023-03-10_134547.png
Thanks
Reply | Threaded
Open this post in threaded view
|

Re: KVM CPU settings

ErmanArslansOracleBlog
Administrator
This post was updated on .
First things first.. You need to have your cores aligned with your Licenses.. (you should set your cpu counts and implement cpu pinning accordingly) ..

Did you do that, and are you okay with this?

And; are you talking about "Cpu threads per core"? So you multiplied that value and your batch processing decreasing dynamically , is it correct?
Reply | Threaded
Open this post in threaded view
|

Re: KVM CPU settings

Roshan
Virtual cpu I set to 16 (means 8 physical cores)? We should stick to maximum 8 cores for licensing. No I am not aware of cpu pinning

When I set the thread from 1 to 2 I saw an improvement of 1 hour. Can i set the thread to higher?
Reply | Threaded
Open this post in threaded view
|

Re: KVM CPU settings

ErmanArslansOracleBlog
Administrator
Maximum 8 cores? If you have 8 CPU intel license, you can use 16 physical cores (as you know, Oracle has a 1/2 core factor for intel).. You should configure your virtual machines accordingly.

If you have limited license , you should also implementing cpu pinning. See -> https://www.oracle.com/a/ocom/docs/linux/ol-kvm-hard-partitioning.pdf
What CPU pinning does is basically, assigning physical CPUs to a VM.

This is also called hard partitioning, as it is used for binding a virtual machine CPU to a physical CPU or core, and preventing it from running on other physical cores than the ones specified. This is done for Oracle CPU licensing purposes, since Oracle VM is licensed on a per-CPU basis.

So, unless you do this, you may have to pay the licenses for all the cores that you have on your physical server.


In that context, for instance;

If we have 2 threads in each core.. So if we have 2 core license for this Guest VM, we need to pin 4 vcpus (threads) to 2 physical cores..  for instance, to -> Core 0 and Core 1

Read the following as well.. It will give you some related info;

https://ermanarslan.blogspot.com/2021/03/ovm-license-cpu-cores-alignment-cpu.html