Linux内存管理(1) -- UMA和NUMA

1.模型起源

  若干年前,x86计算机内存控制器还没有整合进CPU,所有内存的访问都需要通过北桥芯片来完成。此时的内存访问如下图所示,被称为UMA(uniform memory access, 一致性内存访问 )。这样的访问对于软件层面来说非常容易实现:总线模型保证了所有的内存访问是一致的。

  之后x86平台经历了一场从“拼频率”到“拼核心数”的转变,越来越多的核心被尽可能地塞进了同一块芯片上,各个核心对于内存带宽的争抢访问成为了瓶颈;此时软件、OS方面对于SMP多核心CPU的支持也愈发成熟;再加上各种商业上的考量,x86平台推出NUMA(Non-uniform memory access, 非一致性内存访问)。

2.UMA模型,NUMA模型

  • 均匀存储器存取(Uniform-Memory-Access,简称UMA)模型
  • 非均匀存储器存取(Nonuniform-Memory-Access,简称NUMA)模型

2.1.UMA模型

  UMA (Uniform Memory Access) system is a shared memory architecture for the multiprocessors. In this model, a single memory is used and accessed by all the processors present the multiprocessor system with the help of the interconnection network. Each processor has equal memory accessing time (latency) and access speed. It can employ either of the single bus, multiple bus or crossbar switch. As it provides balanced shared memory access, it is also known as SMP (Symmetric multiprocessor) systems.

  The typical design of the SMP is where each processor is first connected to the cache then the cache is linked to the bus. At last the bus is connected to the memory. This UMA architecture reduces the contention for the bus through fetching the instructions directly from the individual isolated cache. It also provides an equal probability for reading and writing to each processor. The typical examples of the UMA model are Sun Starfire servers, Compaq alpha server and HP v series.

  传统的多核运算是使用SMP(Symmetric Multi-Processor )模式:将多个处理器与一个集中的存储器和I/O总线相连。所有处理器只能访问同一个物理存储器,因此SMP系统有时也被称为一致存储器访问(UMA)结构体系,一致性指无论在什么时候,处理器只能为内存的每个数据保持或共享唯一一个数值。

  物理存储器被所有CPU均匀共享。所有处理机对所有存储字具有相同的存取时间,这就是为什么称它为均匀存储器存取的原因。每台处理机可以有私用高速缓存,外围设备也以一定形式共享。

  显然,SMP的缺点是可伸缩性有限,因为在存储器和I/O接口达到饱和的时候,增加处理器并不能获得更高的性能。
在这里插入图片描述

2.2.NUMA模型

  NUMA (Non-uniform Memory Access) is also a multiprocessor model in which each processor connected with the dedicated memory. However, these small parts of the memory combine to make a single address space. The main point to ponder here is that unlike UMA, the access time of the memory relies on the distance where the processor is placed which means varying memory access time. It allows access to any of the memory location by using the physical address.

  Non-uniform memory access (NUMA) is a shared memory architecture used in today’s multiprocessing systems. Each CPU is assigned its own local memory and can access memory from other CPUs in the system. Local memory access provides a low latency – high bandwidth performance. While accessing memory owned by the other CPU has higher latency and lower bandwidth performance.

在这里插入图片描述

参考:
https://frankdenneman.nl/2016/07/07/numa-deep-dive-part-1-uma-numa/

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值