VM resource allocation in a virtual environment

Virtual resources are controled by hypervisor, and to allocated to individual VM.

CPU/MEM resources are not  equivilant  with them on the node, this is called resource overcommitment.

1. CPU:

VM consue CPU resource which can be treated in frequency. 

for example: we have 20 VMs, each of them running CPU at 1100Mhz, thus total 22000Mhz.

when the node has 10 cores, and each has 2.5GHZ.

we can see that the CPU usage is 22000/2500*10= 88%.

thus when we design the architecutre we may consider the CPU frequence/Cores/sockets and also the estimation of consuption on each VM in frequence.

furthermore there is a cpu_allocation_ratio which point the ability of  each physical cores can virulized to vitual cores. if the ratio is 16:1 which means that each physical core can simulate up to 16 virutal cores

 

2. Memory

Same with CPU resource, there is also a ram_allocation_ratio. we can  imagin that we have totally 4G memory on the node, but we can create 4 VMs  with 2G memory each, totally 8G memory, more than capacibily of 4G on the node; hypervisor will monitor the idle VM instance, and allocate the memory to the busier instance from  the idle ones.

 

but we still need to monitor closely  and gather more infomation to determine the best ratio number, make full use of the hardware  with no performance issue or crash problems. 

 

转载于:https://my.oschina.net/jenningsloy318/blog/718330

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值