linux – 比Centos 7上安装的内存更少
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了linux – 比Centos 7上安装的内存更少,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含10953字,纯文字阅读大概需要16分钟。
内容图文
![linux – 比Centos 7上安装的内存更少](/upload/InfoBanner/zyjiaocheng/959/59a16f092be44390a80ed464ba3fdad9.jpg)
我似乎无法弄清楚为什么我的RAM可用性比安装的少.我在联想x230上运行64位Centos 7和1个4096MB的RAM模块.来自机器的一些信息:
$free -m
total used free shared buff/cache available
Mem: 2439 1129 172 124 1137 857
Swap: 2087 41 2046
$cat /etc/centos-release
CentOS Linux release 7.2.1511 (Core)
$uname -m
x86_64
$dmidecode -t memory | grep -i size
Size: 4096 MB
Size: No Module Installed
$lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 2
Core(s) per socket: 2
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 58
Model name: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
Stepping: 9
CPU MHz: 1639.519
BogoMIPS: 5786.51
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 4096K
NUMA node0 CPU(s): 0-3
BIOS显示要安装的4096MB RAM.
$dmesg | grep -C 3 -i mtrr
[ 0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable
[ 0.000000] AGP: No AGP bridge found
[ 0.000000] e820: last_pfn = 0x11e600 max_arch_pfn = 0x400000000
[ 0.000000] MTRR default type: uncachable
[ 0.000000] MTRR fixed ranges enabled:
[ 0.000000] 00000-9FFFF write-back
[ 0.000000] A0000-BFFFF uncachable
[ 0.000000] C0000-FFFFF write-protect
[ 0.000000] MTRR variable ranges enabled:
[ 0.000000] 0 base 0FFC00000 mask FFFC00000 write-protect
[ 0.000000] 1 base 000000000 mask F80000000 write-back
[ 0.000000] 2 base 080000000 mask FC0000000 write-back
$dmesg | grep -C 3 -i e820
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 3.10.0-327.13.1.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Thu Mar 31 16:04:38 UTC 2016
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.10.0-327.13.1.el7.x86_64 root=/dev/mapper/centos00-root ro crashkernel=auto rd.lvm.lv=centos00/root rd.lvm.lv=centos00/swap rhgb quiet LANG=en_ZA.UTF-8
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009d7ff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009d800-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000001fffffff] usable
[ 0.000000] BIOS-e820: [mem 0x0000000020000000-0x00000000201fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000020200000-0x0000000040003fff] usable
[ 0.000000] BIOS-e820: [mem 0x0000000040004000-0x0000000040004fff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000040005000-0x000000008c0a0fff] usable
[ 0.000000] BIOS-e820: [mem 0x000000008c0a1000-0x00000000dae9efff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000dae9f000-0x00000000daf9efff] ACPI NVS
[ 0.000000] BIOS-e820: [mem 0x00000000daf9f000-0x00000000daffefff] ACPI data
[ 0.000000] BIOS-e820: [mem 0x00000000dafff000-0x00000000df9fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000f8000000-0x00000000fbffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fed08000-0x00000000fed08fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fed10000-0x00000000fed19fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fed1c000-0x00000000fed1ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000ffc00000-0x00000000ffffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000011e5fffff] usable
[ 0.000000] NX (Execute Disable) protection: active
[ 0.000000] SMBIOS 2.7 present.
[ 0.000000] DMI: LENOVO 2325SRQ/2325SRQ, BIOS G2ETA5WW (2.65 ) 09/17/2015
[ 0.000000] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[ 0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable
[ 0.000000] AGP: No AGP bridge found
[ 0.000000] e820: last_pfn = 0x11e600 max_arch_pfn = 0x400000000
[ 0.000000] MTRR default type: uncachable
[ 0.000000] MTRR fixed ranges enabled:
[ 0.000000] 00000-9FFFF write-back
--
[ 0.000000] 8 base 11E800000 mask FFF800000 uncachable
[ 0.000000] 9 base 11E600000 mask FFFE00000 uncachable
[ 0.000000] x86 PAT enabled: cpu 0, old 0x704$free -m
total used free shared buff/cache available
Mem: 2439 1129 172 124 1137 857
Swap: 2087 41 2046
$cat /etc/centos-release
CentOS Linux release 7.2.1511 (Core)
$uname -m
x86_64
$dmidecode -t memory | grep -i size
Size: 4096 MB
Size: No Module Installed
$lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 2
Core(s) per socket: 2
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 58
Model name: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
Stepping: 9
CPU MHz: 1639.519
BogoMIPS: 5786.51
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 4096K
NUMA node0 CPU(s): 0-3
70406, new 0x701
$free -m
total used free shared buff/cache available
Mem: 2439 1129 172 124 1137 857
Swap: 2087 41 2046
$cat /etc/centos-release
CentOS Linux release 7.2.1511 (Core)
$uname -m
x86_64
$dmidecode -t memory | grep -i size
Size: 4096 MB
Size: No Module Installed
$lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 2
Core(s) per socket: 2
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 58
Model name: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
Stepping: 9
CPU MHz: 1639.519
BogoMIPS: 5786.51
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 4096K
NUMA node0 CPU(s): 0-3
70106
[ 0.000000] e820: last_pfn = 0x8c0a1 max_arch_pfn = 0x400000000
[ 0.000000] found SMP MP-table at [mem 0x000f0100-0x000f010f] mapped at [ffff8800000f0100]
[ 0.000000] Base memory trampoline at [ffff880000097000] 97000 size 24576
[ 0.000000] init_memory_mapping: [mem 0x00000000-0x000fffff]
--
[ 0.000000] PM: Registered nosave memory: [mem 0xfee00000-0xfee00fff]
[ 0.000000] PM: Registered nosave memory: [mem 0xfee01000-0xffbfffff]
[ 0.000000] PM: Registered nosave memory: [mem 0xffc00000-0xffffffff]
[ 0.000000] e820: [mem 0xdfa00000-0xf7ffffff] available for PCI devices
[ 0.000000] Booting paravirtualized kernel on bare hardware
[ 0.000000] setup_percpu: NR_CPUS:5120 nr_cpumask_bits:8 nr_cpu_ids:8 nr_node_ids:1
[ 0.000000] PERCPU: Embedded 31 pages/cpu @ffff88011e200000 s87168 r8192 d31616 u262144
--
[ 0.078755] ACPI: bus type PCI registered
[ 0.078756] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[ 0.078931] PCI: MMCONFIG for domain 0000 [bus 00-3f] at [mem 0xf8000000-0xfbffffff] (base 0xf8000000)
[ 0.078933] PCI: MMCONFIG at [mem 0xf8000000-0xfbffffff] reserved in E820
[ 0.079010] PCI: Using configuration type 1 for base access
[ 0.079718] ACPI: Added _OSI(Module Device)
[ 0.079720] ACPI: Added _OSI(Processor Device)
--
[ 0.116705] usbcore: registered new device driver usb
[ 0.116763] PCI: Using ACPI for IRQ routing
[ 0.118451] PCI: pci_cache_line_size set to 64 bytes
[ 0.118883] e820: reserve RAM buffer [mem 0x0009d800-0x0009ffff]
[ 0.118884] e820: reserve RAM buffer [mem 0x40004000-0x43ffffff]
[ 0.118885] e820: reserve RAM buffer [mem 0x8c0a1000-0x8fffffff]
[ 0.118886] e820: reserve RAM buffer [mem 0x11e600000-0x11fffffff]
[ 0.118961] NetLabel: Initializing
[ 0.118962] NetLabel: domain hash size = 128
[ 0.118963] NetLabel: protocols = UNLABELED CIPSOv4
$lspci -vnn | grep VGA -A 12
00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) (prog-if 00 [VGA controller])
Subsystem: Lenovo Device [17aa:21fa]
Flags: bus master, fast devsel, latency 0, IRQ 27
Memory at f0000000 (64-bit, non-prefetchable) [size=4M]
Memory at e0000000 (64-bit, prefetchable) [size=256M]
I/O ports at 6000 [size=64]
Expansion ROM at <unassigned> [disabled]
Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
Capabilities: [d0] Power Management version 2
Capabilities: [a4] PCI Advanced Features
Kernel driver in use: i915
00:14.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller [8086:1e31] (rev 04) (prog-if 30 [XHCI])
解决方法:
有许多可能的原因,在没有完全监控系统的情况下从这里调查问题有点不可能/不可行.
但在这里,我将列出三个可能的原因:
第一
原因可能因系统上的任务和正在执行的操作而有所不同,如果使用任何虚拟化,可能会有所不同,如果任何关联的进程执行快照和通过COW内存分配(Copy-on-right),分区规则是正在运行,内存映射文件I / O,共享对象旨在由可执行文件和其他共享对象文件共享,动态链接(后期绑定)等.
此外,请注意,通过添加所有正在运行的进程正在使用的内存,您无法始终找到真正的总内存.由于共享对象和其他与RAM相关的概念,有许多应用程序似乎使用的内存比机器上实际存在的内存多.
此外,空闲内存全部是关于没有映射到它的逻辑数据的物理内存.是的,我们应该知道未使用的内存部分有一些数据映射到它但不处于活动状态并由正在运行的进程使用.
顺便说一句,请注意,类Unix系统想拥有 – 并显示 – 尽可能少的可用内存,而不是所有可用内存!因此,根据您可能已经猜到的,他们使用的内存不会主动映射到正在运行的计算机中的进程,例如用于各种IO传输操作和缓存的缓冲区.
第二
你的BIOS可能有问题,但是因为它显示了确切的RAM数量,我们可以说BIOS没有任何问题,而且内核没有使用它.
最后
我要列出的最后一件事,就是以某种方式首先出现在任何人心中,这就是为GPU相关的内存保留RAM,特别是如果你有一个板载GPU.但是因为你的dmesg输出了grep -C 3 -i e820显示没有错,所以,这不是你的问题.
很难说你的问题是什么,因为我们对你的服务器没有深刻的理解,但是你在问题和评论中提到的都是,我想我们在这里什么也做不了.
我建议你?做一些测试,例如通过运行yum install memtest86下载memtest86并尝试测试你的内存,看看你的退出代码是什么.并使用诸如vmstat -a,vmstat -s,cat / proc / meminfo,top,htop,sar -r等命令监视系统内存一段时间,看看你是否看到任何奇怪的东西.
如果上述建议没有帮助?
另外两个最终选择:首先,重新安置你的ram,这个Lenovo support可以帮助你.其次,重建并安装新内核.
我希望这可以提供帮助.
内容总结
以上是互联网集市为您收集整理的linux – 比Centos 7上安装的内存更少全部内容,希望文章能够帮你解决linux – 比Centos 7上安装的内存更少所遇到的程序开发问题。
如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。
来源:【匿名】