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.

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 characteristics
  • Reduces 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.

Virtual Machine in Cloud Computing

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

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

Server

Virtual Machines

Server 1

VM 1

VM 2

VM 3

Server 2

VM 4 

VM 5

VM 6

Server 3

VM 7

VM 8

VM 9

….

……

……

Server M

VM n-2

VM n-1

VM 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 Workloads

Resource Centric

Resource requirement varies continuously

Utilize 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.

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.

VM in Cloud Computing

 

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 Components

Allocated

In use

Assumed Weight

Weighted Sum

CPU

2.7 GHz

1.75 GHz

0.4

0.7

RAM

8 GB

4.3GB

0.2

0.86

Network

20 GB (upload and download)

17 GB

0.1

1.7

Disk

500 GB

320 GB

0.3

96

 

 

Sum

1

99.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.

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_TestVM1

99.26

Server 1

Go4hosting_TestVM2

98.35

 

Go4hosting_TestVM3

52.23

 

Total

249.84

 

 

 

 

New_VM1

63.54

Server 2

New_VM2

84.24

 

New_VM3

45.39

 

Total

193.17

 

 

 

 

Final_VM1

66.24

Server 3

Final_VM2

53.21

 

Final_VM3

62.24

 

Total

181.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_TestVM1

99.26

     

Server 1

Go4hosting_TestVM2

98.35

     

 

Go4hosting_TestVM3

52.23

     
 

Total

249.84

72 %

14

 
 

 

       

 

New_VM1

63.54

     

Server 2

New_VM2

84.24

     

 

New_VM3

45.39

     
 

Total

193.17

61 %

19.5

 
 

 

       

 

Final_VM1

66.24

     

Server 3

Final_VM2

53.21

     

 

Final_VM3

62.24

     
 

Total

181.69

58 %

21

 

     

 

54.5

Total 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 centres 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.