V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
0216789abc
V2EX  ›  Linux

CentOS 7 可用内存少了 4G 多

  •  
  •   0216789abc · 2015-01-03 22:51:28 +08:00 · 7232 次点击
    这是一个创建于 3424 天前的主题,其中的信息可能已经有所发展或是发生改变。
    服务器内存配置256G,全新安装CentOS7,使用free指令查看发现内存totel只有251GiB,具体数值是263918996,谁知道怎么回事?
    20 条回复    2015-01-17 15:45:53 +08:00
    oott123
        1
    oott123  
       2015-01-03 23:15:38 +08:00
    前来围观土豪……
    为什么我感觉是寻址空间不够用了……
    omi4399
        2
    omi4399  
       2015-01-04 00:07:54 +08:00
    楼主真土豪! 4G 内存应该是CentOS的Kdump吃掉的。
    Dannytmp
        3
    Dannytmp  
       2015-01-04 00:20:44 +08:00
    什么牌子的服务器,可以装256的内存
    nicai000
        4
    nicai000  
       2015-01-04 00:24:39 +08:00
    free本来就不是显示物理内存大小, 显示的是内核管理的内存大小
    0216789abc
        5
    0216789abc  
    OP
       2015-01-04 00:27:15 +08:00   ❤️ 1
    @oott123 事实上是够用的,64位处理器的内存寻址能力应对256G绰绰有余
    blacktulip
        6
    blacktulip  
       2015-01-04 00:29:50 +08:00
    内存比我硬盘大
    kiritoalex
        7
    kiritoalex  
       2015-01-04 00:31:00 +08:00 via Android
    估计占满了也没事,毕竟内存这个本来就是保留的,也就是说那少的部分仍可用
    0216789abc
        8
    0216789abc  
    OP
       2015-01-04 00:35:25 +08:00
    @omi4399 谢谢,查了一宿,kdump有吃掉一部分,大部分是被dmesg里面的PM: registered nosave memory信息吃掉的,进一步查询,有说是电源管理的,有说是isa/dma映射的,没个准确说法。感觉再深究就要去读kernel了……
    0216789abc
        9
    0216789abc  
    OP
       2015-01-04 00:36:10 +08:00
    @Dannytmp Xeon V2 以后都可以装那么多了
    0216789abc
        10
    0216789abc  
    OP
       2015-01-04 00:36:41 +08:00
    @nicai000 我的问题就是为什么内核管理的内存少了那么多
    nicai000
        11
    nicai000  
       2015-01-04 00:40:57 +08:00
    @0216789abc 内核自身, 硬件映射, reserved, kdump等等等等
    omi4399
        12
    omi4399  
       2015-01-04 00:45:25 +08:00
    @0216789abc 不谢,话说楼主肯定不差这4G 内存,还是早点睡吧,别折腾了。
    nicai000
        13
    nicai000  
       2015-01-04 00:46:47 +08:00
    @0216789abc 还有显存, "PM: registered nosave memory"只知道是map给了硬件, 但内核无法得知给了谁, 因为不是内核给的
    0216789abc
        14
    0216789abc  
    OP
       2015-01-04 00:55:46 +08:00
    @nicai000 谢谢。奇怪的是,map给硬件的内存空间是随着内存总量成比例提升的,还有一台32G的服务器只map了几百MB。
    0216789abc
        15
    0216789abc  
    OP
       2015-01-04 01:00:33 +08:00
    @omi4399 最近在测试一揽子新技术,把BIOS里能开的新技术都打开了,主要是担心是不是新技术导致的问题。
    omi4399
        16
    omi4399  
       2015-01-04 01:30:57 +08:00
    @0216789abc BIOS 里内存大小显示是多少?
    omi4399
        17
    omi4399  
       2015-01-04 02:02:05 +08:00
    @0216789abc

    System Memory Sizing and Publishing
    The address space configured in a system depends on the amount of actual physical memory installed, on the RAS configuration, and on the PCIe* configuration. RAS configurations reduce the memory space available in return for the RAS features. PCIe* devices which require address space for Memory Mapped IO (MMIO) with 32-bit or 64- bit addressing, increase the address space in use, and introduce discontinuities in the correspondence between physical memory and memory addresses.
    The discontinuities in addressing physical memory revolve around the 4GB 32-bit addressing limit. Since the system reserves memory address space just below the 4GB limit, and 32-bit MMIO is allocated just below that, the addresses assigned to physical memory go up to the bottom of the PCI allocations, then “jump” to above the 4GB limit into 64-bit space. See the comments below about Memory reservations.

    取自英特尔官方文档
    billwang
        18
    billwang  
       2015-01-04 09:54:47 +08:00
    256G内存,这种可以做小机了。敢问这种服务器用来做什么服务支撑的?虚拟机?
    VYSE
        19
    VYSE  
       2015-01-04 12:26:53 +08:00
    128G CENTOS也被吃掉2G,129062MB
    tywtyw2002
        20
    tywtyw2002  
       2015-01-17 15:45:53 +08:00
    @0216789abc 我以前装centos 7的时候也是少了4G,查了半天没查不来,重启了2次就好了,感觉是一个bug吧。有一次重启是断电1个小时(转移到机房)。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3499 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 05:14 · PVG 13:14 · LAX 22:14 · JFK 01:14
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.