Number of processors assigned to Guest OSs (time slicing?) - virtual-machine

VMWare Workstation Pro 14
Windows 10 v1809
4 processor CPU (Core i7-6700 3.4GHz)
I am wondering about how to assign processors to my Guest OSs.
I am using guest OSs
CentOS 6.9
CentOS 6.9
Ubuntu 16.04 LTS
Windows 7
Windows 8.1
Windows 10
If I assign each processors to fours guest OSs, that are equal to the physical number of processors (four), and also use processors for host OS. But I have no problem in doing so.
Question: Are the processors assigned using time-slicing, making a single CPU assigned to two Guest OS in turn?
If so, I am thinking to increase number of processors assigned to some GuestOS (e.g. 2).

There's a CPU scheduler that's in use. Basically, it makes it so that the VM can make use of any available CPU instead of being pinned to a specific CPU where it could get stuck waiting for an extended period of time.
More information about the scheduler concept can be found in the following whitepaper: https://www.vmware.com/content/dam/digitalmarketing/vmware/en/pdf/techpaper/vmware-vsphere-cpu-sched-performance-white-paper.pdf

Related

Apache Tomcat Crashes In Google Compute Engine f1-micro

I am running Apache Guacamole on a Google Cloud Compute Engine f1-micro with CentOS 7 because it is free.
Guacamole runs fine for some time (an hour or so) then unexpectantly crashes. I get the ERR_CONNECTION_REFUSED error in Chrome and when running htop I can see that all of the tomcat processes have stopped. To get it running again I just have to restart tomcat.
I have a message saying "Instance "guac" is overutilized. Consider switching to the machine type: g1-small (1 vCPU, 1.7 GB memory)" in the compute engine console.
I have tried limiting the memory allocation to tomcat, but that didn't seem to work.
Any suggestions?
I think the reason for the ERR_CONNECTION_REFUSED is likely due to the VM instance falling short on resources and in order to keep the OS up, process manager shuts down some processes. SSH is one of those processes, and once you reboot the vm, resource will resume operation in full.
As per the "over-utilization" notification recommending g1-small (1 vCPU, 1.7 GB memory)", please note that, f1-micro is a shared-core micro machine type with 0.2 vCPU, 0.60 GB of memory, backed by a shared physical core and is only ideal for running smaller non-resource intensive applications..
Depending on your Tomcat configuration, also note that:
Connecting to a database is an intensive process.
Creating a Tomcat with Google Marketplace, the default VM setting is "VM instance: 1 vCPU + 3.75 GB memory (n1-standard-1) so upgrading to machine type: g1-small (1 vCPU, 1.7 GB memory) so should ideal in your case.
Why was g1 small machine type recommended. Please note that Compute Engine uses the same CPU utilization numbers reported on the Compute Engine dashboard to determine what recommendations to make. These numbers are based on the average utilization of your instances over 60-seconds intervals, so they do not capture short CPU usage spikes.
So, applications with short usage spikes might need to run on a larger machine type than the one recommended by Google, to accommodate these spikes"
In summary my suggestion would be to upgrade as recommended. Also note that, the rightsizing gives warnings when VM is underutilized or overutilized and in this case, it is recommending to increase your VM size due to overutilization and keep in mind that this is only a recommendation based on the available data.

Openstack Compute node performance

Am starting to learn openstack. As per my understanding (after reading all the docs) is that the compute nodes run a host OS (ubuntu or other linux) and on top of that you have your hypervisor (like KVM) and then the VMs run on top of it i.e HW -> OS -> Hypervisor -> VMs . This is similar to having a VM running on Virtualbox which runs on a host operating system i.e HW-> Host OS ->VBox -> VMs.Please correct me if my understanding is incorrect.
Assuming my first understanding is correct, How will the performance of the VMs on the this architecture be compared to running the VMs directly on hypervisor i.e HW-> Hypervisor (KVM)->VMs ?
Comparing this with VMWare openstack architecture where Nova speaking to VMWare vCenter and then vCenter manages the ESXi nodes (vCenter and ESXi are on different nodes). This way my VMs are directly running on top of hypervisor connected to HW (HW->ESXi->VMs).And all the overlay networking is handled by NSX. This looks much more performant compared to the other architecture. Am i missing something here ?
Thanks in advance.
~exp8
Since kvm runs on linux kernel, and runs instructions directly on the cpu, it is the hypervisor (HW -> HyperVisor -> VM). On the VMware side, there is a tiny proprietary tuned version of linux as hypervisor.
To find out which one is more efficient, you should do benchmarking. But if you think Vmware's linux consumes less resources (less process, memory, cpu), it may be better.

Difference between virtual machine process and host os process?

Suppose in my pc I have Ubuntu as Host OS. Now I installed a Virtual Machine say VirtualBox (hypervisor) and then deployed a centos and a redhat os inside that as guest OS.
Suppose CentOS and redhat has 2 processes running and Ubuntu is running 3 processes. So following are my questions:
There are how many processes that Ubuntu is having?
Is there any difference between GuestOS and HostOS processes?
If all guestos runs as a process then they will get less time as compared to other process running on host os.
Please clear my doubts here.
Thank you.
Well let me clear your doubts,
First of all there aren't any specific number of process for an OS, its called as cores or threads, technically you can define how many cores or threads you want to use on your virtual machine and it depends on the system configuration you use.
Secondly Guest OS is what you have created in the virtual machine and host is what your laptop or pc actually run. Host OS uses the actual hardware for the working whereas the Guest OS uses the virtual hardware like number of cores and type and size of hard drive defined by the user while adding a virtual machine.
Third, as I mentioned earlier Guest and Host OS works on the configurations used by you, if you user higher amount of cores/ threads in setting your virtual machine the Guest OS will get higher speed.
Ideally the virtual machines are used to test and create some functionality of the Operating Systems without affecting the internal OS, so you can think of it as a your parents house where you can live and grow but at the end you cannot go away from the fact that their contribution is more and so you cannot go beyond their features without leaving it and making your own home.
Linux operating systems are multi-threaded operating system. The host OS would consider virtual box as a thread. You can define number of cores and virtual hard disk size for guest OS by using virtual box.
Since virtual box runs in separate thread and other operations of host OS runs in separate threads, there would be less effect on speed of processing. But I've observed big variances in processing speed in systems which have low memory. Each and every thread needs specific allocation of memory for its smooth operation. So systems having more than 2 GB RAM managed virtual box very well.

SystemC running inside a virtual machine, timing issues or corrupt results?

Is it ok to run a SystemC based simulation on a guest OS inside a virtual machine? Can simulation time be affected by this? I know that SystemC time is simulated and not actually tied to hardware timers.
And will running dozens of instances of SystemC simulations in the virtual machine configured with 4 cores (physical machine has 8) affect the results?
There are no problems running SystemC on a virtual machine. I do it regularly with VirtualBox. I run SystemC on Linux and Windows virtual machines, both 32-bit and 64-bit.
Unless there is a bug in the virtual machine software, a software application should behave identically when run on a physical or virtual machine.
Running multiple SystemC simulations concurrently on a virtual machine is also fine. The limit to how many simulations you can run concurrently, will be based on how much RAM you have available.

Does VMWare or any other 'virtualization software' alowe you to set the amount of CPU cores?

I am setting up a testing PC to help find a weired bug on a single core computer. None of the PCs in our office have single core any more.
Can I use VMWare to something similar to emulate a single core PC on a multi-core computer?
Can you emulate a 32Bit version of windows with VMWare on a 64bit PC?
Yes for both questions with VMWare.
You can change the number of CPUs (cores) to allocate for each Virtual Machine. If you allocate just one, you'll have your 1-core machine.
You can install a 32-bit operating system on a 64-bit VMWare host.
Yes. Pretty much all the desktop virtualisation apps default to emulating a single-core 32-bit guest machine. (They may be using multiple host cores to do it.)
VMware and VirtualBox allow multiple cores to be configured and 64-bit guests; VirtualPC currently does not.