Debian

Xen 伺服器:可用記憶體!= dmidecode -t17 輸出

  • February 12, 2020

概述

我在 Debian buster 上執行 Xen 伺服器。最新核心、最新 BIOS 版本、舊版引導。

引導到 Xen 伺服器僅顯示 8 GB 的可用 RAM,同時辨識出 16 GB 的 RAM 已連接。

在沒有 Xen 的情況下啟動到 Debian 顯示所有 16 GB 的 RAM 空閒。

**我的問題:**知道我能做些什麼來強制 Xen 使用全部 16 GB 嗎?

例如,我可以看到xl dmesg由於某些不匹配而使用 32 位定址而不是 64 位定址是錯誤的。我可以強制 ACPI 使用 64 位嗎?

日誌

來自 Xen

啟動到 Xen 顯示ACPI: 32/64X FACS address mismatch in FADT - da7ed080/0000000000000000, using 32並使用總共 16 GB 的 RAM 中的 8 GB。

user@server:~/ free -m
free -m
             total        used        free      shared  buff/cache   available
Mem:           7387         379        6635           9         373        6841
Swap:         16291           0       16291

user@server:~/ dmidecode -t17
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.

Handle 0x0041, DMI type 17, 34 bytes
Memory Device
       Array Handle: 0x0040
       Error Information Handle: Not Provided
       Total Width: 64 bits
       Data Width: 64 bits
       Size: 4096 MB
       Form Factor: DIMM
       Set: None
       Locator: DIMM3
       Bank Locator: Not Specified
       Type: DDR3
       Type Detail: Synchronous
       Speed: 1600 MT/s
       Manufacturer: Samsung
       Serial Number: 03B0650F7097
       Asset Tag: 02151000
       Part Number: M378B5173QH0-CK0  
       Rank: 1
       Configured Memory Speed: 1333 MT/s

Handle 0x0043, DMI type 17, 34 bytes
Memory Device
       Array Handle: 0x0040
       Error Information Handle: Not Provided
       Total Width: 64 bits
       Data Width: 64 bits
       Size: 4096 MB
       Form Factor: DIMM
       Set: None
       Locator: DIMM1
       Bank Locator: Not Specified
       Type: DDR3
       Type Detail: Synchronous
       Speed: 1333 MT/s
       Manufacturer: Kingston
       Serial Number: 05009D00801C
       Asset Tag: 07194900
       Part Number: 99U5402-034.A00LF 
       Rank: 1
       Configured Memory Speed: 1333 MT/s

Handle 0x0045, DMI type 17, 34 bytes
Memory Device
       Array Handle: 0x0040
       Error Information Handle: Not Provided
       Total Width: 64 bits
       Data Width: 64 bits
       Size: 4096 MB
       Form Factor: DIMM
       Set: None
       Locator: DIMM4
       Bank Locator: Not Specified
       Type: DDR3
       Type Detail: Synchronous
       Speed: 1600 MT/s
       Manufacturer: Samsung
       Serial Number: 0330650F7097
       Asset Tag: 02151000
       Part Number: M378B5173QH0-CK0  
       Rank: 1
       Configured Memory Speed: 1333 MT/s

Handle 0x0047, DMI type 17, 34 bytes
Memory Device
       Array Handle: 0x0040
       Error Information Handle: Not Provided
       Total Width: 64 bits
       Data Width: 64 bits
       Size: 4096 MB
       Form Factor: DIMM
       Set: None
       Locator: DIMM2
       Bank Locator: Not Specified
       Type: DDR3
       Type Detail: Synchronous
       Speed: 1333 MT/s
       Manufacturer: Kingston
       Serial Number: 0500A4008015
       Asset Tag: 07194900
       Part Number: 99U5402-034.A00LF 
       Rank: 1
       Configured Memory Speed: 1333 MT/s

user@server:~/ xl dmesg
(XEN) parameter "placeholder" unknown!
(XEN) Xen version 4.11.4-pre (Debian 4.11.3+24-g14b62ab3e5-1~deb10u1) (pkg-xen-devel@lists.alioth.debian.org) (gcc (Debian 8.3.0-6) 8.3.0) debug=n  Wed Jan  8 20:16:51 UTC 2020
(XEN) Bootloader: GRUB 2.02+dfsg1-20
(XEN) Command line: placeholder
(XEN) Xen image load base address: 0xdb000000
(XEN) Video information:
(XEN)  VGA is text mode 80x25, font 8x16
(XEN)  VBE/DDC methods: V2; EDID transfer time: 1 seconds
(XEN) Disc information:
(XEN)  Found 1 MBR signatures
(XEN)  Found 3 EDD information structures
(XEN) Xen-e820 RAM map:
(XEN)  0000000000000000 - 000000000009d800 (usable)
(XEN)  000000000009d800 - 00000000000a0000 (reserved)
(XEN)  00000000000e0000 - 0000000000100000 (reserved)
(XEN)  0000000000100000 - 00000000d0ad5000 (usable)
(XEN)  00000000d0ad5000 - 00000000d0adc000 (ACPI NVS)
(XEN)  00000000d0adc000 - 00000000d0f18000 (usable)
(XEN)  00000000d0f18000 - 00000000d13af000 (reserved)
(XEN)  00000000d13af000 - 00000000d7eeb000 (usable)
(XEN)  00000000d7eeb000 - 00000000d8000000 (reserved)
(XEN)  00000000d8000000 - 00000000d8760000 (usable)
(XEN)  00000000d8760000 - 00000000d8800000 (reserved)
(XEN)  00000000d8800000 - 00000000d8fae000 (usable)
(XEN)  00000000d8fae000 - 00000000d9000000 (ACPI data)
(XEN)  00000000d9000000 - 00000000da71c000 (usable)
(XEN)  00000000da71c000 - 00000000da800000 (ACPI NVS)
(XEN)  00000000da800000 - 00000000dbe11000 (usable)
(XEN)  00000000dbe11000 - 00000000dc000000 (reserved)
(XEN)  00000000dd000000 - 00000000df200000 (reserved)
(XEN)  00000000f8000000 - 00000000fc000000 (reserved)
(XEN)  00000000fec00000 - 00000000fec01000 (reserved)
(XEN)  00000000fed00000 - 00000000fed04000 (reserved)
(XEN)  00000000fed1c000 - 00000000fed20000 (reserved)
(XEN)  00000000fee00000 - 00000000fee01000 (reserved)
(XEN)  00000000ff000000 - 0000000100000000 (reserved)
(XEN)  0000000100000000 - 000000041ee00000 (usable)
(XEN) ACPI: RSDP 000F0490, 0024 (r2 DELL  )
(XEN) ACPI: XSDT D8FED098, 00AC (r1 DELL    CBX3     1072009 AMI     10013)
(XEN) ACPI: FACP D8FF8B50, 010C (r5 DELL    CBX3     1072009 AMI     10013)
(XEN) ACPI: DSDT D8FED1D0, B97E (r2 DELL    CBX3          14 INTL 20091112)
(XEN) ACPI: FACS DA7ED080, 0040
(XEN) ACPI: APIC D8FF8C60, 0092 (r3 DELL    CBX3     1072009 AMI     10013)
(XEN) ACPI: FPDT D8FF8CF8, 0044 (r1 DELL    CBX3     1072009 AMI     10013)
(XEN) ACPI: SLIC D8FF8D40, 0176 (r3 DELL    CBX3     1072009 MSFT    10013)
(XEN) ACPI: LPIT D8FF8EB8, 005C (r1 DELL    CBX3           0 AMI.        5)
(XEN) ACPI: SSDT D8FF8F18, 0539 (r1  PmRef  Cpu0Ist     3000 INTL 20120711)
(XEN) ACPI: SSDT D8FF9458, 0AD8 (r1  PmRef    CpuPm     3000 INTL 20120711)
(XEN) ACPI: SSDT D8FF9F30, 01C7 (r1  PmRef LakeTiny     3000 INTL 20120711)
(XEN) ACPI: HPET D8FFA0F8, 0038 (r1 DELL    CBX3     1072009 AMI.        5)
(XEN) ACPI: SSDT D8FFA130, 036D (r1 SataRe SataTabl     1000 INTL 20120711)
(XEN) ACPI: MCFG D8FFA4A0, 003C (r1 DELL    CBX3     1072009 MSFT       97)
(XEN) ACPI: SSDT D8FFA4E0, 34D6 (r1 SaSsdt  SaSsdt      3000 INTL 20091112)
(XEN) ACPI: ASF! D8FFD9B8, 00A5 (r32 INTEL       HCG        1 TFSM    F4240)
(XEN) ACPI: SSDT D8FFDA60, 0587 (r1 AMITCG     PROC        1 INTL 20120711)
(XEN) ACPI: MSDM D8FFDFE8, 0055 (r3 DELL    CBX3     6222004 AMI     10013)
(XEN) ACPI: DMAR D8FFE040, 00B8 (r1 INTEL      HSW         1 INTL        1)
(XEN) ACPI: TCPA D8FFE0F8, 0032 (r2 APTIO4  NAPAASF        1 MSFT  1000013)
(XEN) System RAM: 16292MB (16683156kB)
(XEN) Domain heap initialised
(XEN) ACPI: 32/64X FACS address mismatch in FADT - da7ed080/0000000000000000, using 32
(XEN) IOAPIC[0]: apic_id 8, version 32, address 0xfec00000, GSI 0-23
(XEN) Enabling APIC mode:  Flat.  Using 1 I/O APICs
(XEN) Switched to APIC driver x2apic_cluster
(XEN) xstate: size: 0x340 and states: 0x7

user@server:~/ xl info
host                   : server
release                : 4.19.0-8-amd64
version                : #1 SMP Debian 4.19.98-1 (2020-01-26)
machine                : x86_64
nr_cpus                : 8
max_cpu_id             : 7
nr_nodes               : 1
cores_per_socket       : 4
threads_per_core       : 2
cpu_mhz                : 3591.702
hw_caps                : bfebfbff:77faf3ff:2c100800:00000021:00000001:000027ab:00000000:00000100
virt_caps              : hvm hvm_directio
total_memory           : 16292
free_memory            : 8278
sharing_freed_memory   : 0
sharing_used_memory    : 0
outstanding_claims     : 0
free_cpus              : 0
xen_major              : 4
xen_minor              : 11
xen_extra              : .4-pre
xen_version            : 4.11.4-pre
xen_caps               : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64 
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0xffff800000000000
xen_changeset          : 
xen_commandline        : placeholder
cc_compiler            : gcc (Debian 8.3.0-6) 8.3.0
cc_compile_by          : pkg-xen-devel
cc_compile_domain      : lists.alioth.debian.org
cc_compile_date        : Wed Jan  8 20:16:51 UTC 2020
build_id               : b6822aa1d8f867753b92985e5cb0e806e520a08c
xend_config_format     : 4

來自 Debian Buster(沒有 Xen)

在沒有 Xen 的情況下啟動到 Debian buster 會產生完整的 16 GB,一切都很好。

user@server:~/ free -m
             total        used        free      shared  buff/cache   available
Mem:          15950         388       15310           8         251       15292
Swap:         16291           0       16291
user@server:~/ dmidecode -t17
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.

Handle 0x0041, DMI type 17, 34 bytes
Memory Device
       Array Handle: 0x0040
       Error Information Handle: Not Provided
       Total Width: 64 bits
       Data Width: 64 bits
       Size: 4096 MB
       Form Factor: DIMM
       Set: None
       Locator: DIMM3
       Bank Locator: Not Specified
       Type: DDR3
       Type Detail: Synchronous
       Speed: 1600 MT/s
       Manufacturer: Samsung
       Serial Number: 03B0650F7097
       Asset Tag: 02151000
       Part Number: M378B5173QH0-CK0  
       Rank: 1
       Configured Memory Speed: 1333 MT/s

Handle 0x0043, DMI type 17, 34 bytes
Memory Device
       Array Handle: 0x0040
       Error Information Handle: Not Provided
       Total Width: 64 bits
       Data Width: 64 bits
       Size: 4096 MB
       Form Factor: DIMM
       Set: None
       Locator: DIMM1
       Bank Locator: Not Specified
       Type: DDR3
       Type Detail: Synchronous
       Speed: 1333 MT/s
       Manufacturer: Kingston
       Serial Number: 05009D00801C
       Asset Tag: 07194900
       Part Number: 99U5402-034.A00LF 
       Rank: 1
       Configured Memory Speed: 1333 MT/s

Handle 0x0045, DMI type 17, 34 bytes
Memory Device
       Array Handle: 0x0040
       Error Information Handle: Not Provided
       Total Width: 64 bits
       Data Width: 64 bits
       Size: 4096 MB
       Form Factor: DIMM
       Set: None
       Locator: DIMM4
       Bank Locator: Not Specified
       Type: DDR3
       Type Detail: Synchronous
       Speed: 1600 MT/s
       Manufacturer: Samsung
       Serial Number: 0330650F7097
       Asset Tag: 02151000
       Part Number: M378B5173QH0-CK0  
       Rank: 1
       Configured Memory Speed: 1333 MT/s

Handle 0x0047, DMI type 17, 34 bytes
Memory Device
       Array Handle: 0x0040
       Error Information Handle: Not Provided
       Total Width: 64 bits
       Data Width: 64 bits
       Size: 4096 MB
       Form Factor: DIMM
       Set: None
       Locator: DIMM2
       Bank Locator: Not Specified
       Type: DDR3
       Type Detail: Synchronous
       Speed: 1333 MT/s
       Manufacturer: Kingston
       Serial Number: 0500A4008015
       Asset Tag: 07194900
       Part Number: 99U5402-034.A00LF 
       Rank: 1
       Configured Memory Speed: 1333 MT/s
total_memory           : 16292
free_memory            : 8278

inxl info的輸出顯示 Xen 正在使用所有可用記憶體,但不是以您期望的方式:它看到所有 16GiB,但未分配的記憶體剛剛超過 8GiB。所以你的 dom0 看到不到 8GiB 的記憶體,其餘的可供 domUs 使用。

如果要為 dom0 分配更多記憶體,則需要編輯引導載入程序配置

(32/64X 錯誤消息並不意味著系統正在切換到 32 位定址;這意味著 ACPI 表中的地址不匹配,並且核心正在使用有效地址,即此處的 32 位地址。這只會影響它如何找到特定的 ACPI 表。)

引用自:https://unix.stackexchange.com/questions/567183