美文网首页
NUMA&TURBO 2021-10-04

NUMA&TURBO 2021-10-04

作者: 9_SooHyun | 来源:发表于2021-10-04 23:26 被阅读0次

NUMA

在cpu多核心的初期,主板上有两个主要芯片组(chipset),靠上方的叫北桥,靠下方的叫南桥。桥,即bridge,意为桥接

cpu和南北桥架构.png

这体现了精细化工的系统设计思想:
系统将涉及到 I/O 的工作层层转包,不断精细化各功能区——CPU 把相对比较慢的 bus 转包给北桥,北桥又把更慢的 bus 转包给南桥,南桥把更更慢的 bus 转包给 Super I/O
(插一句嘴,现在设计工程架构,其实也是这么一种精细化分工的思想,比如最常见的service和dao层——dao层:data access object,dao的作用是封装对数据库的访问,增删改查,不涉及业务逻辑,只是达到按某个条件获得指定数据的要求;而service则在dao层之上,则是专注业务逻辑,对于其中需要的数据库操作,都通过调用dao去实现)

大体上说,北桥负责与CPU通信,并且连接高速设备(内存/显卡),并且与南桥通信;南桥负责与低速设备(硬盘/USB)通信,时钟/BIOS/系统管理/旧式设备控制,并且与北桥通信
北桥的功能现在已经被集成到cpu内部了,现在的主板已经看不到北桥的影子了

一开始,所有cpu核心(cores)通过北桥对内存进行访问:cpu-北桥-内存,它们对内存的访问是地位一致
这样的访问内存的机制称为UMA(Uniform Memory Access),统一内存访问。这样的架构对软件层面来说非常容易,总线模型保证所有的内存访问是一致的,即每个处理器核心共享相同的内存地址空间

The traditional model for multiprocessor support is symmetric multiprocessor (SMP). In this model, each processor has equal access to memory and I/O. As more processors are added, the processor bus becomes a limitation for system performance.

NUMA 全称 Non-Uniform Memory Access,译为非一致性内存访问。这种构架下,出现了Node的概念——不同的内存器件和CPU核心从属不同的 Node,每个 Node 都有自己的集成内存控制器(IMC,Integrated Memory Controller)

System designers use non-uniform memory access (NUMA) to increase processor speed without increasing the load on the processor bus. The architecture is non-uniform because each processor is close to some parts of memory and farther from other parts of memory. The processor quickly gains access to the memory it is close to, while it can take longer to gain access to memory that is farther away.

In a NUMA system, CPUs are arranged in smaller systems called nodes. Each node has its own processors and memory, and is connected to the larger system through a cache-coherent interconnect bus.

The system attempts to improve performance by scheduling threads on processors that are in the same node as the memory being used. It attempts to satisfy memory-allocation requests from within the node, but will allocate memory from other nodes if necessary. It also provides an API to make the topology of the system available to applications. You can improve the performance of your applications by using the NUMA functions to optimize scheduling and memory usage

一句话总结numa:

事实上,不同的cpu核心对同一位置的内存的访问距离不同,因此将这些cpu和临近的内存空间绑定,精细化地进行分组——划分成多个node

  • 划分成多个node之前,所有cpu cores是一个大的SMP模式
  • 划分成多个node之后,cpu cores形成若干组更加精细的SMP模式,每个node内部使用 IMC Bus 进行不同核心间的通信;不同的 node 间通过QPI(Quick Path Interconnect)进行通信

TURBO

超线程技术,让1个cpu物理核心虚拟化成2个逻辑核心,使得cpu支持的线程数翻倍

相关文章

  • NUMA&TURBO 2021-10-04

  • 2021-10-10 思考成长周复盘

    一 时间 2021-10-04 ~ 2021-10-10 二 围绕精力提升所做的事情 五点早起,读书学习 简书日更...

  • 第315篇|【岁月守候】 生活有时候也需要自得宅乐

    ❁/岁月守候(D32-34) 2021-10-04,星期一,阴 68)国庆观影。天气凉下来,正是可以出去走一走。滨...

  • 创造美是最高的乐趣

    2021-10-04 周一 晴 今天最高气温32度。很热,窝在家里没有出门。早上起的很早,忙活了一阵以后,...

  • 又接着日更

    尊敬的用户,您好!由于2021-10-04系统故障导致您的日更失败,我们深感抱歉,现已将您当时的日更恢复。2021...

  • 我的修行生活--04

    2021-10-04 星期一 没有其他梦境,也无其他事。 早上站桩11分钟,晚上8点站桩10分钟。 渐渐喜欢这种静...

  • 陌上花渡

    2021-10-04 周一 晴 丫头上学去了,我们可以敞开玩。 农夫思来想去,他说去银杏湖吧,公司里的小陈前天才去...

  • 创始人的带头作用之经典案例

    2021-10-04 1.乔布斯与苹果 乔布斯曾在访谈里说:“你问我对产品的直觉从哪里来,这最终得由你的品味来决定...

  • 2021-10-04

    灯已掩了,“女儿……不孝啊”一声声嘶力竭的吼声撕破了寂静,在九十年代初的老旧小区中扩散出去,唯“不孝”二字在喀痰声...

  • 2021-10-04

    成为一片星云,你需要光的时候我就凝聚成星,什么时候不需要了,我重新化作尘埃,但永远游离在你的身旁。——《追光》...

网友评论

      本文标题:NUMA&TURBO 2021-10-04

      本文链接:https://www.haomeiwen.com/subject/ftrwnltx.html