虚拟化中的资源浪费 [英] Wastage of resources in Virtualization

查看:106
本文介绍了虚拟化中的资源浪费的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定这是否是问问题的书面地点.但是我希望是这样.

I am not sure if this is the write place to ask the question. However i hope it is.

今天早些时候寻找VPS时,我试图了解每个容器在后台如何工作.请记住,操作系统使用系统上的大部分功能,而同一台计算机上没有多个操作系统,这意味着更多的资源浪费.

When looking for a VPS earlier today, I was trying to understand how each container would work in the background. Keeping in mind the fact that the operating system uses most of the power and power on a system, wouldn't having multiple operating systems in the same machine mean more wastage of resources.

例如,如果我在专用盒子上运行centOS,并且正在运行,则可以说20个后台OS级别的进程.然后,我去安装一个虚拟化平台,并在与主机操作系统完全相同的同一系统中安装5个以上的centOS虚拟机.这不是意味着将这20个进程重复6次吗?那么内部上下文切换是在120个进程之间发生的,而不是20个?

For instance if i was running centOS on a dedicated box and it was running lets say 20 background OS level processes. Then i go and install a virtualization platform and install 5 more centOS virtual machines in the same system which are exactly the same as the host operating system. Doesn't this mean duplication of those 20 processes 6 times? So internally the context switching is happening between 120 processes instead of 20?

推荐答案

首先,您的问题似乎涉及两个主题,即完全虚拟化和半虚拟化.大多数VPS都提供了准虚拟化的环境,该环境(广义上来说)仅虚拟化OS的部分,对于用户而言,它似乎是一个完全虚拟化的系统,但就进程I/O而言,它可以视操作系统和实施方式的不同而异.

Firstly your question seems to touch on two topics, full virtualization and paravirtualization. Most VPS are providing a paravirtualized environment which (to very broadly generalize) only virtualizes parts of the OS, it appears as a fully virtualized system to the user but in terms of processes, I/O, it can be very different depending on the OS and the way this has been implemented.

在处理完整的来宾虚拟化时,虚拟化的主要原因和好处是回收未充分利用的资源.充分利用 idle 的容量.

When dealing with full guest virtualization, the main reason and benefit of Virtualization is reclaiming underutilized resources. Making use of that idle capacity.

例如,可以在一台服务器上虚拟化5台平均资源利用率为15%的计算机,平均使用75%的资源,而仍然留有25%的开销来处理高峰容量.

For example, 5 machines running at average resource utilization of 15% could be virtualized on a single server and use an average of 75% resources, still leaving 25% overhead to handle peak capacity.

如果您的进程可以在同一系统上共存,则可以启动/关闭所有依赖于同一库,配置设置等的进程,然后重新启动它们而又不会互相影响-那么您可以浪费"虚拟化它们的资源.

If your processes can co-exist on the same system, all depend on the same libraries, configuration settings, etc. can be brought up/down and restarted without affecting each other - then you may "waste" resources virtualizing them.

但是,如果您需要在不影响服务器B的情况下重新引导/重新启动服务器A,并且它们的使用率都非常低,或者例如,这两个应用程序依赖于不同的内核版本,那么这是进行虚拟化的不错选择.

However if you need to reboot/restart Server A without affecting Server B and they both have pretty low usage, or the two applications depend on different kernel versions for example - then that's a good candidate for virtualization.

当您升级到企业级虚拟化并开始考虑每小时美分和每千兆字节美元的计算成本时,与节省和其他收益相比,这种开销"实在是小巫见大巫.您不会有一半的磁盘空着,CPU空闲,资源浪费,谁来配置谁的竞争.虚拟主机可以根据负载,容错能力,高可用性,自动配置在主机之间移动.

When you move up to enterprise level virtualization and start thinking about computing costs in cents-per-hour and dollars-per-gigabyte then this "overhead" is nothing compared to the savings and other benefits. You don't have disks half empty, CPUs idling, wasted resources, competition for who gets to configure what. Virtual hosts can move between hosts depending on load, fault tolerance, high-availability, automated provisioning.

这篇关于虚拟化中的资源浪费的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆