AHV Hypervisor上的内存分配和分配

  • 2020年10月17日
  • 0回答
  • 556的浏览量

Userlevel 2
徽章

AHV Hypervisor上的内存分配和分配总是一个棘手的等式,计算起来并不简单或直接。我决定深入研究这方面,发现相当复杂。

我从Acropolis Master运行以下命令并收集主机10.21.46.243的信息:

美元的链接http: 0:2030

让我们参考本清单中该主机的数据:

主机IP: 10.21.46.243

cpu: 88

cpu使用:37.58

CPU自由:50.42

内存:515822 MB即512gb

内存使用:261104 MB,即261104 GB

内存预留:0mb

内存空闲:254718 MB即255gb

请注意,我们通过在主机管理程序上运行# cat /proc/meminfo获得的输出将显示MemFree和MemAvailable字段的少量数字(小于0.2%)

主机总内存):

[root@NTNX-16SM76360147-A ~]# cat /proc/meminfo | head -3 .使用实例

MemTotal: 528210648 kB

内存清理:1891960 kB

MemAvailable: 2619508 kB

root@NTNX-16SM76360147-A ~ #

这是因为内存分配是由Hypervisor通过所谓的Hugepages提前分配给vm的,命令中有一个字段

输出显示提到这个数字。请注意,主机上的512gb RAM中,只有大约1到2gb的RAM被保留或被列出的# ps -eaf进程占用,你会在AHV Linux操作系统上看到。

回到我们在Acropolis中提到的例子,即主机10.21.46.243,512 GB的总内存被拆分如下:

vm使用的内存(包括CVM使用的32gb,可能不会显示在Acropolis表中)= 212 GB

$ links http:0:2030/sched -dump

vm上10.21.46.243

+------------------------------------------------------------------------------------------+
|名称| UUID |状态|CPU |CPU |CPU |内存|目的地址|
| | | | |使用|免费| | |
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEN34 |caa059f7-3d86-4bcd-b7fe-88819f305bf0| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvDet04 |716050b6-817d-43cc-b5c5-5244b45fa2ad| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| KapellaSF |fd3f9ef9-b5cb-4fc3-aa3f-5726d988adb8| On | 2| 0.02|1.98| 4gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvCivil13 |d0dbb045-97f9-4e55-bb24-6773298bfba0| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvDet01 |67105ade-a32f-4410-babe-a6126187741c| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| Altair27 |7348c35d-fc01-4a63-81fc-f48efc861bc2| On | 2| 0.01|1.99| 4gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvDek10 |4f5c11c4-653c-45d5-bb5c-a9b5ceb02e63| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WMVOTLW02 |f00f6f6f-65ea-4c9c-8b39-0a490ad2b2dd| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEK80 |56a1e5bb-653a-47f0-9566-9d73c57c714c| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvDet17 |5a906266-d1ad-4484-b85d-c28639f9db56| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWES27 |2bdfd126-a6f2-441b-9b0d-67462647c882| On |2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEY31 |fb129c75-8926-43b9-90a1-779982b1931a| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| wmvdisn4 |671cde8f-f555-4a92-8697-602ed9e522cd| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWER45 |9645c0b9-8d6d-41ea-9b94-14721606bdc3| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWET10 |9dc45338-4ca6-403d-874e-3d92e31ed49f| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWES75 |4b996bf0-03b6-4957-8d1f-39ef869e3eea| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| wmvdpn7 |aa52edaa-c350-4eaf-a904-0284f489a5fc| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEQ40 |39b250be-33a4-44dd-9c0f-c132cde461a2| On | 2| 0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvDet13 |be0188de-cb80-44c1-bf50-e87a01ca17ef| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| wmvdisn6 |fe3b7177-b602-454c-9301-56801a90767a| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEP50 |38aeb025-6979-4bd1-adb5-0edde9c8ad92| On | 2| 0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEW74 |924e2aac-f19f-451b-a1ac-11bfa40921e8| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWER26 |56712f21-adfc-42a2-b7f2-eba348e25f87| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEL30 |3de91f71-f053-4e01-a18d-e3836fe581ed| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WMVOTLW04 |5f3ab684-0952-44bb-aecf-261992ed0bd2| On | 2| 0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEA79 |390c96ed-de43-4174-b90e-7fabddab511e| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvFire01 |a4720efe-609c-4d12-bbd2-ff7b5f6bd73e| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
|WMVAdminWEL05|1cbeef63-61bc-453b-a2b2-7a6807925d53| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWED48 |323adcd6-f296-4164-8c4b-8be0badc9e01| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWES43 |8565610e-03b7-4544-bd04-67547727c844| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEO38 |b5d6cb1c-1f10-46e5-9962-15bea9119c08| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEP52 |0293e426-be16-4c56-b18f-5bc354087bfb| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEE71 | fe|a9 -ed4a-4387-917a-0e2e665e5e5a| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEV35 |c1f4ab5f-3d55-4683-9482-d2bc02b457cd| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEC49 | 6376bad -906d-42a7-a9a7-ec2b95c38195| On | 2 |0.10|1.90| 6gb |无|
|-------------+------------------------------------+-----+----+----+----+------+-----------|
| WmvGenWEX24 |20cb3af -8a1f-4b98-9b3f-cf38d51216a6| On |2 |0.10|1.90| 6gb |无|
+------------------------------------------------------------------------------------------+

High Availability预留内存:40gb

可用内存= 255gb

Hypervisor为其进程占用的内存= 2 GB

请注意,上述数字并不精确,但已足够接近准确的值。

希望上面的解释解释了内存分配。

从限制我们自己的单一主机稍微偏离,我们经常看到在主机之间的“内存空闲”字段的差异,从高到100 GB到低到402 MB,这取决于每个主机提供服务的虚拟机数量,以及特定主机上单个虚拟机的大小,这将决定该主机上有多少内存可用。如果查看构成高可用性资源的Memory Reserved列,您将看到每个主机向HA池贡献的RAM数量有更多的一致性或更少的差异。


0回答

做第一个回复的人!

回复


Baidu