MMU
- MMU(Memory Management Unit) 负责将逻辑地址转化为物理地址
- 对于现代处理器来说,一般每个core都有自己的 MMU
- 页表等数据结构保存在 TLB
NUMA
Non-uniform memory access (NUMA) is a computer memory design used in multiprocessing, where the memory access time depends on the memory location relative to the processor. Under NUMA, a processor can access its own local memory faster than non-local memory (memory local to another processor or memory shared between processors). The benefits of NUMA are limited to particular workloads, notably on servers where the data is often associated strongly with certain tasks or users.
NUMA (Non-uniform memory access) 结构可以缓解总线(bus)资源争用,它将内存分为不同node,并把它们分配给不同组CPU core。当一个core需要访问内存时,它会优先尝试访问它的本地节点上的内存,如果数据不在它的本地节点上,它会通过互联机制访问其他节点上的内存。
numactl
可以将进程绑定到特定NUMA节点、控制内存分配策略。
CPU Saturation
❏ Utilization: The time the CPU was busy (not in the idle thread)
❏ Saturation: The degree to which runnable threads are queued waiting their turn on-CPU
● High CPU usage of a system is not a bad sign all the time. CPU is available to be used.
● If run-queue length is high for a significant amount of time, that mean the system is overloaded, and needs optimizations.
提升CPU利用率是好事,是优化。CPU放在那里就是给你用的。
但是如果提升了CPU利用率的同时导致 run-queue length is high ,就要排查一下原因了。
将CPU utilization 和 saturation放在一起观察可以更好地描述CPU load averages。