操作系统:Xen Cloud Platform 1.1 (XCP) 修改后的 centos,以及在 intel i5 上运行的 xen server 5.0
免费-m
total used free shared buffers cached
Mem: 309 136 172 0 1 17
-/+ buffers/cache: 117 191
Swap: 511 7 504
DF-H
none 380M 0 380M 0% /dev/shm
猫/proc/meminfo
MemTotal: 316416 kB
MemFree: 79024 kB
Buffers: 5444 kB
Cached: 79304 kB
SwapCached: 0 kB
Active: 48020 kB
Inactive: 64092 kB
Active(anon): 30572 kB
Inactive(anon): 1624 kB
Active(file): 17448 kB
Inactive(file): 62468 kB
Unevictable: 6436 kB
Mlocked: 6436 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 316416 kB
LowFree: 79024 kB
SwapTotal: 524280 kB
SwapFree: 524280 kB
Dirty: 172 kB
Writeback: 0 kB
AnonPages: 33876 kB
Mapped: 17864 kB
Shmem: 124 kB
Slab: 17100 kB
SReclaimable: 8276 kB
SUnreclaim: 8824 kB
KernelStack: 1464 kB
PageTables: 0 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 682488 kB
Committed_AS: 647196 kB
VmallocTotal: 245752 kB
VmallocUsed: 4576 kB
VmallocChunk: 237148 kB
DirectMap4k: 754492 kB
DirectMap2M: 0 kB**
顶部输出
Mem: 316416k total, 237992k used, 78424k free, 5636k buffers
Swap: 524280k total, 0k used, 524280k free, 79404k cached
根据 RAM 排序 (shift+m)
top - 14:59:20 up 29 min, 1 user, load average: 0.00, 0.00, 0.00
Tasks: 113 total, 1 running, 112 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si,
0.0%st
Mem: 316416k total, 238008k used, 78408k free, 5708k
buffers
Swap: 524280k total, 0k used, 524280k free, 79440k
cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
5942 root 17 -3 179m 12m 5492 S 0.3 4.2 0:05.72 xapi
6964 root 20 0 11776 7672 2856 S 0.3 2.4 0:00.87 python
5939 root 17 -3 21524 6092 2880 S 0.0 1.9 0:00.00 xapi
6700 root 20 0 11768 5028 1644 S 0.0 1.6 0:00.16 python
5740 ntp 20 0 4496 4496 3488 S 0.0 1.4 0:00.05 ntpd
6398 root 20 0 27772 4052 1020 S 0.0 1.3 0:00.01 snapwatchd
5634 root 20 0 170m 3620 2664 S 0.0 1.1 0:00.02 lwregd
5527 root RT 0 3432 3432 2708 S 0.0 1.1 0:00.04 multipathd
7909 root 20 0 10168 2824 2268 S 0.0 0.9 0:00.03 sshd
6128 root 20 0 29608 2792 1540 S 0.0 0.9 0:00.03 mpathalert
7921 root 20 0 5152 2024 1268 S 0.0 0.6 0:00.05 bash
5632 root 20 0 173m 1576 1036 S 0.0 0.5 0:00.00 lwsmd
5241 root 10 -10 5988 1504 928 S 0.0 0.5 0:00.30 ovs-vswitchd
5804 root 20 0 2992 1472 564 S 0.0 0.5 0:00.09 fe
5909 root 20 0 11600 1452 912 S 0.0 0.5 0:00.04 squeezed
5228 root 10 -10 5448 1440 1052 S 0.0 0.5 0:00.08 ovsdb-server
5858 root 20 0 5360 1304 780 S 0.0 0.4 0:00.03 xenstored
5831 root 20 0 12964 1212 756 S 0.0 0.4 0:00.00 v6d
6552 root 20 0 5384 1108 572 S 0.0 0.4 0:00.00 crond
8122 root 20 0 2404 1104 836 R 0.3 0.3 0:00.41 top
6499 root 20 0 7180 1068 664 S 0.0 0.3 0:00.00 sshd
5834 root 20 0 21112 1064 604 S 0.0 0.3 0:00.36 v6d
6968 root 20 0 4492 1044 672 S 0.0 0.3 0:00.00 vncterm
6969 root 20 0 2544 1044 912 S 0.0 0.3 0:00.00 dom0term.sh
5240 root 10 -10 5880 832 272 S 0.0 0.3 0:00.28 ovs-vswitchd
1527 root 16 -4 2364 744 396 S 0.0 0.2 0:01.24 udevd
1 root 20 0 2156 664 564 S 0.0 0.2 0:00.21 init
5563 rpc 20 0 1904 644 548 S 0.0 0.2 0:00.00 portmap
6038 root 17 -3 5208 632 272 S 0.0 0.2 0:00.00 stunnel
5376 root 20 0 1808 616 516 S 0.0 0.2 0:00.01 syslogd
5227 root 10 -10 5444 556 280 S 0.0 0.2 0:00.27 ovsdb-server
5861 root 20 0 10392 548 436 S 0.0 0.2 0:00.00 xenconsoled
5869 root 20 0 3072 476 256 D 0.0 0.2 0:00.51 cdrommon
6967 root 20 0 1752 472 404 S 0.0 0.1 0:00.00 agetty
6965 root 20 0 1740 452 388 S 0.0 0.1 0:00.00 mingetty
BIOS 上显示已安装 4 GB 的 RAM。在同一台机器上,早期的 ubuntu 12.04 运行时没有显示任何 RAM 问题。
更新:
在里面xsconsole(xen控制台)>硬件和BIOS信息>系统内存>
总内存 4096 MB
已安装内存插槽 2
总内存插槽数 4
答案1
dom0 内存受 /boot/extlinux.conf 中 extlinux 启动参数的限制(查找 dom0_mem)。在我的下面这个配置文件中,它被设置为 752Mo,安装后可能会根据服务器的整个 RAM 而变化。
猫/boot/extlinux.conf
...
label xe
# XCP
kernel mboot.c32
append /boot/xen.gz dom0_mem=752M lowmem_emergency_pool=1M crashkernel=64M@32M console= vga=mode-0x0311 --- /boot/vmlinuz-2.6-xen root=LABEL=root-nddcwqei ro xencons=hvc console=hvc0 console=tty0 quiet vga=785 splash --- /boot/initrd-2.6-xen.img
...
dom0 使用的 RAM 不可用于虚拟机,它用于网络桥接和物理块设备处理等。
所以这意味着您的虚拟机有 4GiB - 300MiB 的 RAM 可用。