I am trying to decide how to tune Vagrant VMs for performance. In this case, the application is web development (linux + ruby + node.js + java, etc).
I usually have to run either one VM by itself, or two VMs simultaneously. In my case, it's on a Macbook Pro, but for the organization, various types of machines will be used.
I have a Vagrantfile that dynamically selects the number of CPUs to use for each VM (e.g., half the available cores, all the available cores, etc), and can also do this with RAM (e.g., 1/4 of total system RAM).
What I'm wondering is: if one has all their Vagrant VMs set to use half or all of the CPU cores, and they run 2 or more VMs simultaneously, how does this play out?
Is it better, or worse, technically, in terms of total performance, given this application (web development)?
Related
I'm testing the speed of different sorting methods for a CS class, and although our professor said we didn't need to be terribly precise, he still wants us to be careful not to run apps in the background while testing, use a different machine, or do anything to throw the speed of the sorts off.
If I ran the tests in a VM, would the environment outside of the VM affect the speed? Would that help make the tests accurate without having to worry about changes in the apps I have open alongside the VM?
In short, yes.
In most scenarios, hosts share their resources with the VM. If you bog down/freeze/crash the host then the VM will be affected.
For those that have more robust servers with better resources, processes running in the host won't affect the VM as much. Because if you have more resources on the host you can assign better RAM and Virtual Processors to the VM so it runs smoothly.
For instance, let's say our host has 64GB of RAM a processor that has 4 cores and 8 threads (such as an Intel® Xeon® E3-1240 Processor).
We can tell VirtualBox, VMware or Hyper-V to assign 32GB of RAM and 4 virtual processors to the VM, essentially cutting the host's power by half.
With this in mind, any processes you run on the host will usually be separate from the VM but if the processes freeze, crash or cause a hard reboot on the host then the VM will be affected regardless of RAM or virtual processors assigned.
In enterprises environments, a hyper-v server should only be used for that purpose and installing/running a lot of processes in the host is usually frowned upon (such as installing/running DHCP, DNS, Web Server (IIS), etc).
So your professor is right to advise against running processes on the host while testing your VM.
I am new to Hadoop and don't know the reason why a virtual machine (VM) is used to run and deploy Hadoop cluster and its modules?
Can we not use Hadoop through the local Linux/Unix system
the reason why a virtual machine (VM) is used to run and deploy Hadoop cluster and its modules
Because lots of data centers have more virtual space than physical space. Thousands of servers can run on hundreds of machines (approximately). That's what any Hadoop Cluster in the cloud would be - a bunch of virtualized machines.
Because some companies just want a small, cheap proof of concept that Haddon will work within their ecosystem of existing software.
Because it's makes an easy demo to boot up a VM rather than carry around several machines.
etc...
Anyways, I'd say it's strongly encouraged to use physical hardware, but that costs time and resources to maintain in terms of money and dealing with hardware failures and keeping software patched between Hadoop and the OS. Primarily you'd want to be able to pick and choose hardware that suits your use cases. Lots of storage for a "data lake" or lots of memory for fast processing. Mix in some SSD for fast caching...
Sure, VMs let you dynamically allocate some of those items, but when a disk or memory stick goes corrupt, it affects all VMs on one machine rather than one server
I have Blade Server and I want to know that how its possible to use cpu/ram between blades.
I want to have a machine with 32 physical cpu and I want all cpus work together.
Is it possible to share cpu between servers ?
No, it is not possible without explicit support from the software. You can't run single-thread program on several cpu cores; and you can ru multi thread program on different unconnected (not coherent) physical cpus.
Different blades are different servers, every one of them has own OS instance. They have no memory coherence, only network connection, so it is task of your software (and of its programmer) to split the task between several processes and connect them using network. In computer clusters there is MPI interface to make programming of such programs easier.
There were several project to emulate shared memory system (or single OS instance system) using cluster of PCs without coherent memory, but they are abandoned and/or too slow: Intel cluster openmp, https://en.wikipedia.org/wiki/Single_system_image (MOSIX/OpenMOSIX), ScaleMP, different software DSM (https://en.wikipedia.org/wiki/Distributed_shared_memory#Software_DSM_implementation)...
On my Mac, I have 8 cores working when I run htop.
I can modifyvm to have 8 cores in my virtual machine as well, but is it a one to one mapping?
Thus, if I set 4 virtual cores, do I have the power of 4 physical cores or do I have the power of 8 distributed on 4? Hence, does it make sense to have multiple cores in a vm regarding the overall performance or does it only make sense if you have processes that do not work well without parallelisation?
I am trying to get a slow machine with IE8 to test for some customers. It is possible to slow down the virtual pc machine provided by MS? I did only find how to reduce RAM but not CPU.
In options, you can choose to divide CPU time equally among all VPC instances, versus runing the active VPC at maximum speed.
No, this is not possible due to the way virtual machines work. As the virtual machines runs directly on the processor, you cannot slow that down. Your only option is to run on a virtual machine that does processor emulation.
VirtualBox from Oracle does what you want. In the main interface, click Settings > System > Processor and set the Execution Cap to (say) 50%. Works nicely, except that the entire VM slows down (not just a specific application like IE).