Archive

Virtualize or not virtualize

VPSEver since there is virtualization especially these few years, your IT team might have been bothered by this question. To virtualize a server or….? The answer is depending. Depends on? Clearly, there are more advantages to virtualize; example license of the software is cheaper, you can install more than one instances on the same server, a virtual switch, it is portable etc.

However, there are a few things to consider that virtualization might not work for you. If you need to split the instances for different departments and it has total privacy. Virtualization does not give you true isolation, there is risk your virtualized server is accessible through the underlying virtualization OS.

Disk IO is started to divide with the number of guest machines you have deployed. The greater the number of guest machines, the slower the disk IO. If you are still using hard disk storage, this is a crucial factor for the SQL database to some.

Failure risk – if your server has failed due to hardware, you might have more than one servers are failed if you virtualized. Especially to those do not have spare resources or a virtualized cluster. Not for dedicated servers, if one failed, the rest will continue to work.

If your guest machines are not paravirtualized, there is a performance overhead, For example, a true hardware ethernet will perform 2 ~4% better than a virtualized network card.

Some software makers have realized they are missing the virtualization segment and have made changes from processor count to core count license but the end of the day virtualization will save you money if you environment permit you to do do.

 

 

VPS with Ploop

To understand the benefits of having PLOOP On OpenVZ container (Linux VPS), we need to knows what are the limitations of the traditional file system on VPS.

  • Since containers are living on one same file system, they all share common properties of that file system (it’s type, block size, and other options). That means we can not configure the above properties on a per-container basis.
  • One such property that deserves a special item in this list is file system journal. While journal is a good thing to have, because it helps to maintain file system integrity and improve reboot times (by eliminating fsck in many cases), it is also a bottleneck for containers. If one container will fill up in-memory journal (with lots of small operations leading to file metadata updates, e.g. file truncates), all the other containers I/O will block waiting for the journal to be written to disk. In some extreme cases we saw up to 15 seconds of such blockage.
  • Since many containers share the same file system with limited space, in order to limit containers disk space we had to develop per-directory disk quotas (i.e. vzquota).
  • Since many containers share the same file system, and the number of inodes on a file system is limited [for most file systems], vzquota should also be able to limit inodes on a per container (per directory) basis.
  • In order for in-container (aka second-level) disk quota (i.e. standard per-user and per-group UNIX dist quota) to work, we had to provide a dummy file system called simfs. Its sole purpose is to have a superblock which is needed for disk quota to work.
  • When doing a live migration without some sort of shared storage (like NAS or SAN), we sync the files to a destination system using rsync, which does the exact copy of all files, except that their i-node numbers on disk will change. If there are some apps that rely on files’ i-node numbers being constant (which is normally the case), those apps are not surviving the migration
  • Finally, a container backup or snapshot is harder to do because there is a lot of small files that need to be copied.

 

In order to address the above problems OpenVVZ decided to implement a container-in-a-file technology, not different from what various VM products are using, but working as effectively as all the other container bits and pieces in OpenVZ.

The main idea of ploop is to have an image file, use it as a block device, and create and use a file system on that device. Some readers will recognize that this is exactly what Linux loop device does! Right, the only thing is loop device is very inefficient (say, using it leads to double caching of data in memory) and its functionality is very limited.

Benefits

  • File system journal is not bottleneck any more
  • Large-size image files I/O instead of lots of small-size files I/O on management operations
  • Disk space quota can be implemented based on virtual device sizes; no need for per-directory quotas
  • Number of inodes doesn’t have to be limited because this is not a shared resource anymore (each CT has its own file system)
  • Live backup is easy and consistent
  • Live migration is reliable and efficient
  • Different containers may use file systems of different types and properties

In addition:

  • Efficient container creation
  • [Potential] support for QCOW2 and other image formats
  • Support for different storage types

 

This article is extracted and found at : https://openvz.org/Ploop/Why