linux - 如何更好地配置 linux/CPU 以运行大型软件 (NUMA)

标签 linux performance memory-management cpu-architecture numa

我在 linux 上对内存驱动的大型程序(数十 GB 内存)进行性能分析。

我在想是否可以配置 linux/hardware 使其更适合运行此类大型程序。但我对这一面并不熟悉。

谁有关于如何配置的要点

  1. 操作系统的内存分配策略
  2. CPU 缓存配置
  3. 其他...

欢迎任何评论..

这是典型的 CPU 模型(4 个 Opteron 处理器,每个处理器都有双核):

processor       : 3
vendor_id       : AuthenticAMD
cpu family      : 15
model           : 65
model name      : Dual-Core AMD Opteron(tm) Processor 2218
stepping        : 2
cpu MHz         : 2600.000
cache size      : 1024 KB
physical id     : 1
siblings        : 2
core id         : 1
cpu cores       : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy
bogomips        : 5200.09
TLB size        : 1088 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp tm stc

最佳答案

对于研究多路系统上的内存/缓存很有用:

  • hwloclstopo ( example ):

    lstopo
    
  • numactl/libnuma(但前提是它确实是 NUMA 系统)

    numactl --hardware
    numactl --show
    
  • sysfs, procfs:

    sudo grep . /sys/devices/system/cpu/cpu*/cpufreq/*
    grep . /sys/devices/system/cpu/cpu*/topology/physical_package_id
    sudo grep . /proc/irq/*/smp_affinity # compare w/ /proc/interrupts
    

关于linux - 如何更好地配置 linux/CPU 以运行大型软件 (NUMA),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5024370/

相关文章:

linux - Alfresco 5.2 高 CPU 使用率和应用程序性能低下

linux - Redis sentinel - 如何让服务器脱离循环?

linux - 我如何并行grep

reactjs - 样式化组件如何影响性能?

sql - 选择计数(*)与保留计数器

c++ - 我的主 C++ 文件中的文本(在尚未执行的代码中)如何显示在字符串中?

ios - 我应该释放 NSData dataWithContentsOfURL 吗?

objective-c - 保留在 NSThread 中创建的对象

linux - 使用 bash 编辑 linux 环境变量

linux - 让 Elastic Search 在 Amazon EC2 Linux 实例上保持活力