Setting up the optimal number of processors/cores per processor virtual machine (VMware) - numbers

I was looking for an answear but didn't find one.
I'm trying to create a new VM to develop a web application. What would be the optimal processor settings?
I have i7 (6th gen) with hyperthreading.
Host OS: Windows 10. Guest OS: CentOS.
Off topic: RAM that should I give to VM should be 50% of my memory? Would it be ok? (I have 16GB RAM)
Thanks!

This is referred to as 'right-sizing' a vm, and it is dependent on the application workload that will run inside it. Ideally, you want to provide the VM with the minimum amount of resources the app requires to run correctly. "Correctly" is subjective based upon your expectations.
Inside your VM (CentOS) you can run top to see how much memory and cpu % is being used. You can also install htop which you may find friendlier than top.
RAM
If you see a low % of RAM being used, you can probably reduce what you're giving the VM. If you are seeing any swap memory used (paging to disk), you may want to increase the RAM. Start with 2GB and see how the app behaves.
CPU
You'll may want to start with no more than 2vCPUs, checkout top to see how utilized the application is under load, and then make an assessment for more/less vCPUs.
The way a hosted hypervisor (VMware Workstation) handles guest CPU usage is through a CPU scheduler. When you give a vm x number of vCPUs, the VM will need to wait till that many cores are free on the CPU to do 'work'. The more vCPUs you give it, the more difficult (slower) it will be to schedule. It's more complicated than this, but I'm trying to keep it high level. CPU scheduling deep dive.

Related

What are the Server Requirements for BluePrism tool with 5 Bots?

The Company that I work for is planning to purchase BluePrism tool, we are in-need of the server requirements (RAM size,HD size etc) for the functioning 5 Bots.
Thanks in Advance for your help.
The Automation Platform required depends of the nature of your automations.
You can run everything in a single node and 8G of RAM and 4 Cores will be enough (if you are not automating applications that require many resources) and if you do not need to run anyhing concurrently.
On the other hand for Production purposes:
1 Blue Prism Application Server 2012 R2 (This is used to Orchestrate
your Platform)... regularly I put at least 8G RAM and 4 Cores, HDD
used for BP is insifnificant 10G after OS installation should be
good.
1 SQL Server (where the structure of your automation, and the execution logs will be allocated) at least 8G RAM and HDD depends of
your transacctions, logging and other configurations that you will
choose when you automate.
1 Interactive Client, (where you will monitor your platform) 4G Ram 50G HDD
1 Runtime Resource (where your automations will run)... here you have to take in consideration all the resources that will be used by
your automation, here you have to deal with that HDD Space, and
Processor Needs. You can only run 1 automation at time, so if you
need to run 5 different automations (what I think that you called
robots) concurrently, you need 5 runtime resources, each one must
have installed the required applications (used to run its
automation)

KVM CPU share / priority / overselling

i have question about KVM i could not find any satisfying answer in the net about.
Lets say i want to create 3 virtual machines on a host with 2 CPUs. I am assigning 1 cpu to 1 virtual machines. The other 2 virtual machines should be sharing 1 cpu. If it is possible i want to give 1 vm 30 % and the other one 70% of the cpu.
I know this does not make much sense but i am curious and want to test is :-)
I know that hypervisors like onapp can do that. But how do they do it?
KVM represents each virtual CPU as a thread in the host Linux system, actually as a thread in the QEMU process. So scheduling of guest VCPUs is controlled by the Linux scheduler.
On Linux, you can use taskset to force specific threads onto specific CPUs. So that will let you assign one VCPU to one physical CPU and two VCPUs to another. See, for example, https://groups.google.com/forum/#!topic/linuxkernelnewbies/qs5IiIA4xnw.
As far as controlling what percent of the CPU each VM gets, Linux has several scheduling policies available, but I'm not familiar with them. Any information you can find on how to control scheduling of Linux processes will apply to KVM.
The answers to this question may help: https://serverfault.com/questions/313333/kvm-and-virtual-to-physical-cpu-mapping. (Also that forum may be a better place for this question, since this one is intended for programming questions.)
If you search for "KVM virtual CPU scheduling" and "Linux CPU scheduling" (without the quotes), you should find plenty of additional information.

CPU high load and free ram

I have a cloud server in cloudways, the CPU load is very high even after I upgrade my server up 2 levels but the strange thing is the ram is almost free ( server 16 GB ram 6 Core) is there anything we can do to take advantage of that free ram to reduce CPU load.
Regards
No CPU and RAM are different things
Check the reason why your CPU is highly loaded.
Maybe your host where your VM runs on is overloaded. Did you try to
contact your cloud provider?

CPU usage of Jboss JVM goes upto 99% and stays there

I am doing load testing on my application using jmeter and I have a situation where the cpu usage by the applications jvm goes to 99% and it stays there. Application still work, I am able to login and do some activity. But, it’s understandably slower.
Details of environment:
Server: AMD Optrom, 2.20 Ghz, 8 Core, 64bit, 24 GB RAM. Windows Server 2008 R2 Standard
Application server: jboss-4.0.4.GA
JAVA: jdk1.6.0_25, Java HotSpot(TM) 64-Bit Server VM
JVM settings:
-Xms1G -Xmx10G -XX:MaxNewSize=3G -XX:MaxPermSize=12G -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+UseCompressedOops -Dsun.rmi.dgc.client.gcInterval=1800000 -Dsun.rmi.dgc.server.gcInterval=1800000
Database: MySql 5.6 (in a different machine)
Jmeter: 2.13
My scenario is that, I make 20 users of my application to log into it and perform normal activity that should not be bringing huge load. Some, minutes into the process, JVM of Jboss goes up and it never comes back. CPU usage will remain like that till JVM is killed.
To help better understand, here are few screen shots.
I found few post which had cup # 100%, but nothing there was same as my situation and could not find a solution.
Any suggestion on what’s to be done will be great.
Regards,
Sreekanth.
To understand the root cause of the high CPU utilization, we need to check the CPU data and thread dumps at same time.
Capture 5-6 thread dumps at the time of the issue. Similarly capture CPU consumption thread-by-thread basis.
Generally the root cause of the CPU issue would be problems with threads like BLOCKED threads, long running threads, dead-lock, long running loops etc. That can be resolved by going through the stacks of the threads.

How does running one virtual machine on a host system will reduce system performance?

I am running one virtual machine on a host system, with 50% memory and 50% CPU allocated to it.
Will this reduce the system performance by half?
Give me your comments and suggestions.
Alex is correct. The reason that it could take less than half of your system performance, is because most virtualization systems will not dedicate precisely that amount of CPU and memory to your virtual machine if the software running inside the VM is not demanding that much. If the VM is running a demanding workload though, this will not be the case.
The reason that it could take more than half of your system performance is because any virtualization system has its own overhead, just in order to provide the virtualization to the VM. Some memory is consumed in tracking the memory and resources used by the virtual machine, and some CPU is consumed in handling the needs of the VM (interrupts from network traffic, etc.).