Speaking of Bare Metal

Exploring the Hypervisor

Vineet Pal Singh
DevOps Dudes
4 min readMay 21, 2020

--

Photo by Rob Lambert on Unsplash

Cloud providers are booming lately and I have seen more than a couple of times when customers have to fall back to the VM only or hybrid model to avoid fancy services provided by cloud providers in order to take control of hefty costs.

This has been a trend if you do not optimize the usage and plan capacity effectively beforehand but seldom do we ponder on these aspects until the applications are running fine or EMs do not get the heat from the upper management about cost-cutting!

What is Bare-Metal or dedicated server?

This is a single-tenant environment with direct access to underlying hardware without any hypervisor overhead, meaning that a single server’s physical resources may not be shared between two or more tenants.
Because of this physical separation, it is free from the behaviours of a virtual environment.
It includes the ability to leverage all of its specific features which would not be accessible with type 1 or 2 hypervisor.

What is Hypervisor?

Hypervisor abstracts guest machines and the operating system they run on, from the actual hardware.
It creates a virtualization layer that separates CPU / Processors, RAM, and other physical resources from the virtual machines you create.
The machine we install a hypervisor on is called a host machine, versus guest virtual machines that run on top of them.

Now, VMs do not know whether they are running as a physical or virtualized environment and if they were created on a hypervisor or are sharing available compute power.
They run simultaneously with the hardware that powers them, and so they are entirely dependent on it for stable operation.

Left: Type-2 Hypervisor | Right: Type-1 Hypervisor

What is Type-1 Hypervisor?

Type 1 hypervisors are an OS themselves, a very basic one on top of which you can run virtual machines.

One of the best features of type-1 hypervisors is that they allow for the over-allocation of physical resources.
With type 1 hypervisors, you can assign more resources to your virtual machines than you have available. For example, if you have 128GB of RAM on your server and eight virtual machines, you can assign 24GB of RAM to each of them. This totals to 192GB of RAM, but VMs themselves will not actually consume all 24GB from the physical server. The VMs think they have 24GB when in reality they only use the amount of RAM they need to perform particular tasks.

Unlike Kubernetes cluster where you define the resource limit of pods which is then deducted from the cluster’s capacity even if you use a minuscule amount of it.

Vendors: KVM, VMware vSphere, Microsoft Hyper-V, Citrix Hypervisor

What is Type-2 Hypervisor?

As opposed to type-1 hypervisors that run directly on the hardware, hosted hypervisors or type-2 hypervisors have one software layer underneath.

A type 2 hypervisor occupies whatever you allocate to a virtual machine.
When you assign 8GB of RAM to a VM, that amount will be taken up even if the VM is using only a fraction of it.
If the host machine has 32GB of RAM and you create 3 VMs with 8GB each, you are left with 8GB of RAM to keep the physical machine running. Creating another VM with 8GB of RAM would bring down your system. This is critical to keep in mind, so as to avoid over-allocating resources and crashing the host machine.

Vendors: VMware Workstation, Oracle VM Virtualbox, Windows Virtual PC

Bare-Metal vs Virtualisation

Performance

A bare-metal server surpasses virtual machines in performance, all else being equal.
The presence of a hypervisor prohibits the use of software that can take advantage of the architectural perks of the physical hardware.

Security

In the world of multi-tenant virtualized servers(cloud), data streams that are infected by malware may affect the distribution of resources across the server.
Although other data streams are quarantined from the infection, the neighbours may suffer the effects of a redirected resource load.

Control

A single tenant exercises more control over a single physical server than a VM on multi-tenant servers in the cloud. The bare metal environment allows a client to fully control and predict bandwidth, memory usage and other important aspects of host machine resources.

Long-term hosting

Small and medium enterprises can cater to pricing and features of cloud providers initially but as an organisation grows, they will have to look for options much feasible to handle large data and compute requirements.

Usually, lucrative pricing and services of cloud providers seem good with limited usage and size of an organisation but when data consumption and infrastructure requirement increases eventually, things began to fall apart with respect to pricing and lucrative services as by then you could create those services in-house given the competency of the engineering team grows with the organisation.

Thus, having competency of bare-metal and cloud is essential for a hybrid infrastructure: the best of both worlds!

--

--