Ubuntu 18.04 不使用超过 32GB 的 RAM

Ubuntu 18.04 不使用超过 32GB 的 RAM

我刚刚将我的电脑升级为 32GB 内存。 BIOS 和lshw都承认所有四个 16GB RAM 模块的存在,但两者都没有freetop并且htop看到实际内存。

$ sudo lshw
adam-potwor                 
    width: 64 bits
    capabilities: smbios-3.0 dmi-3.0 smp vsyscall32
    configuration: boot=normal chassis=desktop family=To Be Filled By O.E.M. sku=To Be Filled By O.E.M. uuid=00020003-0004-0005-0006-000700080009
  *-core
       description: Motherboard
       product: X399 Taichi
       vendor: ASRock
       physical id: 0
       serial: M80-AA002300154
     *-firmware
          description: BIOS
          vendor: American Megatrends Inc.
          physical id: 0
          version: P1.50
          date: 09/05/2017
          size: 64KiB
          capacity: 15MiB
          capabilities: pci upgrade shadowing cdboot bootselect socketedrom edd int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer acpi usb biosbootspecification uefi
     *-memory
          description: System Memory
          physical id: 10
          slot: System board or motherboard
          size: 64GiB
        *-bank:0
             description: DIMM DDR4 Synchronous Unbuffered (Unregistered) 2134 MHz (0.5 ns)
             product: F4-3000C16-16GISB
             vendor: Unknown
             physical id: 0
             serial: 00000000
             slot: DIMM 0
             size: 16GiB
             width: 64 bits
             clock: 2134MHz (0.5ns)
        *-bank:1
             description: DIMM DDR4 Synchronous Unbuffered (Unregistered) 2134 MHz (0.5 ns)
             product: F4-3000C16-16GISB
             vendor: Unknown
             physical id: 1
             serial: 00000000
             slot: DIMM 1
             size: 16GiB
             width: 64 bits
             clock: 2134MHz (0.5ns)
        *-bank:2
             description: DIMM DDR4 Synchronous Unbuffered (Unregistered) 2134 MHz (0.5 ns)
             product: F4-3000C16-16GISB
             vendor: Unknown
             physical id: 2
             serial: 00000000
             slot: DIMM 0
             size: 16GiB
             width: 64 bits
             clock: 2134MHz (0.5ns)
        *-bank:3
             description: DIMM DDR4 Synchronous Unbuffered (Unregistered) 2134 MHz (0.5 ns)
             product: F4-3000C16-16GISB
             vendor: Unknown
             physical id: 3
             serial: 00000000
             slot: DIMM 1
             size: 16GiB
             width: 64 bits
             clock: 2134MHz (0.5ns)
        *-bank:4
             description: [empty]
             product: Unknown
             vendor: Unknown
             physical id: 4
             serial: Unknown
             slot: DIMM 0
        *-bank:5
             description: [empty]
             product: Unknown
             vendor: Unknown
             physical id: 5
             serial: Unknown
             slot: DIMM 1
        *-bank:6
             description: [empty]
             product: Unknown
             vendor: Unknown
             physical id: 6
             serial: Unknown
             slot: DIMM 0
        *-bank:7
             description: [empty]
             product: Unknown
             vendor: Unknown
             physical id: 7
             serial: Unknown
             slot: DIMM 1
     *-cache:0
          description: L1 cache
          physical id: 12
          slot: L1 - Cache
          size: 1536KiB
          capacity: 1536KiB
          clock: 1GHz (1.0ns)
          capabilities: pipeline-burst internal write-back unified
          configuration: level=1
     *-cache:1
          description: L2 cache
          physical id: 13
          slot: L2 - Cache
          size: 8MiB
          capacity: 8MiB
          clock: 1GHz (1.0ns)
          capabilities: pipeline-burst internal write-back unified
          configuration: level=2
     *-cache:2
          description: L3 cache
          physical id: 14
          slot: L3 - Cache
          size: 32MiB
          capacity: 32MiB
          clock: 1GHz (1.0ns)
          capabilities: pipeline-burst internal write-back unified
          configuration: level=3
     *-cpu
          description: CPU
          product: AMD Ryzen Threadripper 1950X 16-Core Processor
          vendor: Advanced Micro Devices [AMD]
          physical id: 15
          bus info: cpu@0
          version: AMD Ryzen Threadripper 1950X 16-Core Processor
          serial: Unknown
          slot: SP3r2
          size: 1888MHz
          capacity: 4200MHz
          width: 64 bits
          clock: 100MHz
          capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid amd_dcm aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb hw_pstate sme ssbd vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca cpufreq
          configuration: cores=16 enabledcores=16 threads=32


$ free -h
              total        used        free      shared  buff/cache   available
Mem:            31G        1.8G         27G         18M        1.8G         29G
Swap:           14G          0B         14G

我使用的是 Ubuntu 18.04

$ uname -r
4.15.0-33-generic

核心。我可以在 AskUbuntu 上发布这个问题,但我有一种感觉,这个问题与内核相关,而不是 Ubuntu 特定的。我当前的 grub 引导条目为

menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-9c791297-4f61-471a-ac23-6228987c316e' {
    recordfail
    load_video
    gfxmode $linux_gfx_mode
    insmod gzio
    if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
    insmod part_gpt
    insmod ext2
    set root='hd0,gpt1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  b0fddb5e-191e-4de0-b8bd-543c3e22a22a
    else
      search --no-floppy --fs-uuid --set=root b0fddb5e-191e-4de0-b8bd-543c3e22a22a
    fi
        linux   /vmlinuz-4.15.0-33-generic root=UUID=9c791297-4f61-471a-ac23-6228987c316e ro rootflags=subvol=@  quiet splash $vt_handoff
    initrd  /initrd.img-4.15.0-33-generic
}

我还安装了 Windows (tm) 来诊断问题。 Windows 10 64位也只有32GB RAM。它将其他 32GB 诊断为“硬件保留”,这强烈表明主板固件中存在错误。

我还确认我的主板具有最新的 BIOS 版本(截至 2018 年 9 月 7 日)

$ dmesg |grep Memory
[    0.000000] Memory: 32676352K/33432868K available (12300K kernel code, 2470K rwdata, 4244K rodata, 2408K init, 2416K bss, 756516K reserved, 0K cma-reserved)
[    0.132315] x86/mm: Memory block size: 128MB

答案1

该问题是由于内存插槽配置不当引起的。将内存更换为A2、B2、C2和D2插槽后,正如Mark Patrick所描述的,解决了所有问题。

所以这个故事的主旨是:当Linux(或Windows)没有使用所有已安装的内存时(即使它看到插槽中的芯片),请检查内存模块是否插入到正确的插槽中。

相关内容