Virtual Machine Placement in Cloud Computing

Feb 17,2021 by Nishant Nath

Posted by Nishant Nath

We guess you have launched Virtual Machines at least once in your life. Having done so you might have an idea of how advantageous VMs are these days. Deploying Virtual Machines might appear as simple as a few clicks, but have you ever considered how tedious the background computations are.  Virtual Machine placement in Cloud Computing is not done randomly. To make sure the VMs deliver performance they guarantee, VMs are very precisely placed in the servers underlying the Cloud.

So, let’s get started right away.

Virtual Machine Placement in Cloud Computing

What does a Virtual Machine do?

Virtual Machine allows you to run one Operating System within another Operating System – thus the word Virtual. But not all VMs are configured in your computer within an OS. Virtual Machine could also be an unseen, unheard computer you have assembled remotely. While you can continue doing the same you normally do on a computer, you cannot touch, see or feel a VM.

Too lazy to read the entire Blog?Play the audio note below to sum things up quick.(here we will upload an audio note for the viewer to play)

Having had an idea about VM, the thought that should pop in your mind is why Virtual Machines are needed? There are various factors that total out to the conclusion.

  • First off, virtualization saves cost. It costs only a fraction to buying and assembling similar hardware in-house.
  • It saves real estate and valuable space.
  • Less hardware to look after means lesser maintenance costs.
  •  Last, it needs little management and even little worries.

Getting started with VM Placement

The VMs may continue to function even when not smartly placed in the Cloud. However, the performance and uptime may witness a stark dip and altogether ruin customer experience.

Why should you consider VM Placement?Improves performance characteristicsReduces power and cooling cost.Better resource utilization

VM Placement is a vital operation involving determining the best hardware to host Virtual Machine in Cloud Computing. VM placement is not a one-time process but rather periodic in nature. Network engineers regularly monitor all VMs to check if any machine needs migrating to another server.

Related Topic:  Latest Trends To Watch In VPN Industry

The figure above shows m servers catering to n virtual machines.

For an instance, consider the data shown in the table below –

ServerVirtual Machines
Server 1VM 1VM 2VM 3
Server 2VM 4 VM 5VM 6
Server 3VM 7VM 8VM 9
….…………
Server MVM n-2VM n-1VM n
  • The table above shows VMs and their placement in the cloud server. Consider VM 5 stationed in Server 2. Now imagine the user operating VM 5 (in yellow) recently installed a new program that has been eating too much of the server’s resource.
  • VM 5 can continue operating from Server 2 as long as VMs 4 and 6 run light-weight applications. If any of the two green VMs (4 or 6) starts running beefy programs, one VM will have to be moved and placed in the remaining server – whichever can accommodate it. 
People also ask…Is Virtual Machine safe?Ever Virtual Machine has two components – Host and the Guest. The resource of either component is virtually separated from the other. Even if one of the components gets hacked, the other remains safe because malware from the Guest cannot break into the host and vice versa.

Virtual Machine Placement in Cloud Computing – the Problem

Before diving into researching solution, it is important to take note of where the problem started in the first place. The technical term hereby used is Virtual Machine Placement Problem, briefed as VMPP. The catch is –

Most workloads today are either dynamic or resource centric.

Dynamic WorkloadsResource Centric
Resource requirement varies continuouslyUtilize one resource (CPU intensive or I/O intensive) more than the other
Dynamic workloads put the underpinning dedicated servers under distress of load sometimes and are mostly underutilized otherwise.Resource centric workloads tend to load one resource too much compared to the other.


So, there is low resource utilization when such applications are hosted on dedicated server.

Related Topic:  6 Applications of Virtual Machines you Need to Know About

The Solution –

To encounter low resource utilization, organizations are leading towards cloud models where several VMs are hosted in a single dedicated server. But given the scale in which this is implemented, a slight rearrangement of VMs can show significant boost in memory utilization. Logically, more the number of VMs in a server, better is the utilization.

It is interesting to note in VM that the end user though in control of the specification, has no control on which server the VM will be hosted.

Did you know?The VM placement problem (VMPP) is dynamic in nature itself. After the first initial placement of the VM, new VMs may arrive; older ones may leave or change their requirements.

Even though the user specifies RAM, CPU, and storage requirements beforehand, the normal usage may sometimes exceed these limits. Not accounting these surges may bottleneck efficient VM placement.

Did you know?The VM placement problem (VMPP) is dynamic in nature itself. After the first initial placement of the VM, new VMs may arrive; older ones may leave or change their requirements.

VMPP Algorithm –

The algorithm for VM placement needs to be invoked during every rescheduling. When a server is found to be under-utilized, VMs are migrated to it. However, migration is a costly affair in itself. Not only will migration increase the operating cost, but can also cause application to slow down temporarily while migration is underway.

The VMPP algorithms should be VM-aware and the aim should be keeping as minimum VMs and Hosts as possible.

Mathematics Involved in writing VMPP algorithms

The problems of placements are tackled using weighted summation of resource requirements. Most data scientists consider CPU and memory disk as ‘resources’, completely ignoring network and disk while there are other approaches that equally account for the two.

VIRTUAL MACHINE – Go4hosting_TestVM1
Resource ComponentsAllocatedIn useAssumed WeightWeighted Sum
CPU2.7 GHz1.75 GHz0.40.7
RAM8 GB4.3GB0.20.86
Network20 GB (upload and download)17 GB0.11.7
Disk500 GB320 GB0.396
  Sum199.26

The above table shows resource usage of a Virtual Machine which we have arbitrarily named Go4hosting_TestVM1. Several such machines are deployed in the server, say Server 1. To calculate how effectively the resource is being used, the CPU, RAM, Network and the Disk are allotted weights 0.4, 0.2, 0.1, and 0.3 respectively.

Related Topic:  Virtual Machines: Everything you need to Know

Note – Weights denote how crucial the organization deems resource components (CPU, RAM, Network, etc.) and may vary from organization to organization.

The weighted sum for all the VMs is calculated and added to give a total weight of sums for all the servers. For example –

 Go4hosting_TestVM199.26
Server 1Go4hosting_TestVM298.35
 Go4hosting_TestVM352.23
 Total249.84
   
 New_VM163.54
Server 2New_VM284.24
 New_VM345.39
 Total193.17
   
 Final_VM166.24
Server 3Final_VM253.21
 Final_VM362.24
 Total181.69

Combining data from three dedicated servers – Server 1, 2, and 3 – we see that Server 3 is the most under-utilized. Moving VM from Server 1 to 3, we can distribute Virtual machines more evenly and have all our dedicated servers better utilized.

Overheads involved in Migrating Virtual Machine in Cloud Computing

Cost is another factor you can consider in your Virtual Machine Placement Algorithm, after all everything eventually bows down to cost-cutting.

You should also consider whether you will lose more money migrating VMs than you are losing in running under-utilized servers. Consider the same data we have been working with so far – 

   Utilization Rate (assumed)Loss per % utilization – 0.5 USD 
 Go4hosting_TestVM199.26   
Server 1Go4hosting_TestVM298.35   
 Go4hosting_TestVM352.23   
 Total249.8472 %14 
      
 New_VM163.54   
Server 2New_VM284.24   
 New_VM345.39   
 Total193.1761 %19.5 
      
 Final_VM166.24   
Server 3Final_VM253.21   
 Final_VM362.24   
 Total181.6958 %21 
    54.5Total Loss

In the current state, say you are losing $0.5 per percent of unutilized resource. Also assume Server 1, 2, and 3 have percent utilization of 72%, 61%, and 58% respectively. 

What experts say?VMs are best when left untouched. Migration should always be your Plan B.

The total loss you would bear is $54.5.

Now, assume one migration costs you $50 and there would still be unutilized resources left, would it be wise migrating VMs?

No.

Thus, there should be provisions for cost calculations in your migration algorithm.

When should you refrain from migrating VMs within the cloud?When the cost associated with migration exceeds the cost of running under-utilized servers.When the VM contains data too sensitive to be touched.SLA that prohibits moving VMs within the cloud.When migrating VMs can cause too much downtime.

The total loss you would bear is $54.5.

Now, assume one migration costs you $50 and there would still be unutilized resources left, would it be wise migrating VMs?

No.

Thus, there should be provisions for cost calculations in your migration algorithm.

When should you refrain from migrating VMs within the cloud?When the cost associated with migration exceeds the cost of running under-utilized servers.When the VM contains data too sensitive to be touched.SLA that prohibits moving VMs within the cloud.When migrating VMs can cause too much downtime.
What experts say?VMs are best when left untouched. Migration should always be your Plan B.

VM placement is not restricted to only scaling utilization of servers. There are other issues that scheduling VM placement can help in countering –

  • Minimizing congestion rate.
  • Traffic-aware VMPP algorithm can minimise downtime
  • It can help organizations achieve different optimization goals. The text box below can explain this more comprehensively
Different organizations function under different ideologies, some favour cost-cutting while some stick to providing high-performance VMs irrespective of the cost associated. Thus, a few tweaks in the Virtual Machine Placement Strategy can help organizations achieve different optimization goals.Low cost providers will give more weight to resource utilization than network in its algorithm.High-performance VM providers may rule out maximizing utilization and keep uptime on the table.

Upshot

Moving Virtual Machines in Cloud Computing data center might look very lucrative but if not properly done, give rise to more problems than it solves. However, as optimization is a key part of any business, virtual machine placement is a cool thing to look into and has a lot of potential in the future. As more and more organizations rush towards the cloud, an effective optimization strategy can help eradicate problems early.

votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

Have questions?

Ask us.



    AWS Standard Consulting Partner

    • Go4hosting
    • Go4hosting

    Alibaba Cloud

    Go4hosting

    Go4hosting-NOW-NASSCOM-Member Drupal Reseller Hosting Partner

    Cyfuture Ltd.

    The Cricket Barn
    Tiverton
    Exeter
    EX16 8ND

    Ph:   1-888-795-2770
    E-mail:   [email protected]