<div class="artical-content-bak main-content editor-side-new">
<div class="con editor-preview-side" id="result">
<p><span style="font-family:'宋体';">虚拟化小白对</span><span style="font-family:Verdana, 'sans-serif';">VMcpu</span><span style="font-family:'宋体';">分配的理解</span></p>
<p><strong><em><span style="font-family:'宋体';color:#FF0000;">首先说下:小弟才疏学浅,还请各路大神指教。</span></em></strong></p>
<p><span style="font-family:Verdana, 'sans-serif';"> </span></p>
<p><span style="font-family:'宋体';">我这里以</span><span style="font-family:Verdana, 'sans-serif';">vSphere 5.5</span><span style="font-family:'宋体';">来举例说明</span><span style="font-family:Verdana, 'sans-serif';"> </span></p>
<p><span style="font-family:'宋体';">在我们虚拟化的环境中,</span><span style="font-family:Verdana, 'sans-serif';">VM</span><span style="font-family:'宋体';">的</span><span style="font-family:Verdana, 'sans-serif';">cpu</span><span style="font-family:'宋体';">数量如何分配,影响着</span><span style="font-family:Verdana, 'sans-serif';">VM</span><span style="font-family:'宋体';">的计算性能,更影响着</span><span style="font-family:Verdana, 'sans-serif';">ESXi</span><span style="font-family:'宋体';">主机的性能。</span></p>
<p><span style="font-family:'宋体';">如果虚拟机少,能做到</span><span style="font-family:Verdana, 'sans-serif';">cpu</span><span style="font-family:'宋体';">不超分,那肯定是没问题,但是这种情况实在是太少了。</span></p>
<p><span style="font-family:'宋体';">随着虚拟化的应用,我们的</span><span style="font-family:Verdana, 'sans-serif';">VM</span><span style="font-family:'宋体';">数量总是在增加,那这就涉及到</span><span style="font-family:Verdana, 'sans-serif';">VM</span><span style="font-family:'宋体';">的</span><span style="font-family:Verdana, 'sans-serif';">cpu</span><span style="font-family:'宋体';">分配问题。</span></p>
<p><span style="font-family:Verdana, 'sans-serif';"> </span></p>
<p><span style="font-family:'宋体';">首先,我们先理解几个和</span><span style="font-family:Verdana, 'sans-serif';">VMcpu</span><span style="font-family:'宋体';">相关的概念</span></p>
<p><strong><span style="font-family:Verdana, 'sans-serif';">Socket--------</span></strong><strong><span style="font-family:'宋体';">插槽数,物理</span></strong><strong><span style="font-family:Verdana, 'sans-serif';">cpu</span></strong><strong><span style="font-family:'宋体';">个数</span></strong></p>
<p><strong><span style="font-family:Verdana, 'sans-serif';">Core----------</span></strong><strong><span style="font-family:'宋体';">核心数</span></strong></p>
<p><strong><span style="font-family:Verdana, 'sans-serif';">Lcpu----------</span></strong><strong><span style="font-family:'宋体';">每个核心上同时可以执行的线程数,一台</span></strong><strong><span style="font-family:Verdana, 'sans-serif';">VM</span></strong><strong><span style="font-family:'宋体';">至少对应一个</span></strong><strong><span style="font-family:Verdana, 'sans-serif';">Lcpu</span></strong></p>
<p><strong><span style="font-family:Verdana, 'sans-serif';">vCPU/vSMP----------</span></strong><strong><span style="font-family:'宋体';">虚拟机的</span></strong><strong><span style="font-family:Verdana, 'sans-serif';">CPU</span></strong></p>
<p><span style="font-family:Verdana, 'sans-serif';"> </span></p>
<p><span style="font-family:'宋体';">以</span><span style="font-family:Verdana, 'sans-serif';">5.5</span><span style="font-family:'宋体';">为例,官方给出的数据是单台</span><span style="font-family:Verdana, 'sans-serif';">ESXi</span><span style="font-family:'宋体';">主机做多能分配出</span><span style="font-family:Verdana, 'sans-serif';">4096</span><span style="font-family:'宋体';">个</span><span style="font-family:Verdana, 'sans-serif';">vcpu。</span></p>
<p><span style="font-family:'宋体';">这里的</span><span style="font-family:Verdana, 'sans-serif';">4096</span><span style="font-family:'宋体';">指的是单台主机上所有</span><span style="font-family:Verdana, 'sans-serif';">VM</span><span style="font-family:'宋体';">分配的</span><span style="font-family:Verdana, 'sans-serif';">vcpu</span><span style="font-family:'宋体';">总数,而不是一台</span><span style="font-family:Verdana, 'sans-serif';">VM</span><span style="font-family:'宋体';">就能分配这么多的</span><span style="font-family:Verdana, 'sans-serif';">vcpu</span><span style="font-family:'宋体';">。</span></p>
<p><span style="font-family:'宋体';">单台</span><span style="f |
|