如何为大规模软件运行(NUMA)更好地配置linux / CPU

时间:2011-02-17 02:10:48

标签: linux performance memory-management cpu-architecture numa

我正在linux上进行性能分析,用于内存驱动的大规模程序(数十GB内存)。

我在想是否可以将linux / hardware配置为更适合运行这种大型程序。但我对这方面并不熟悉。

任何人都有关于如何配置的要点

  1. 操作系统的内存分配策略
  2. CPU的缓存配置
  3. 否则...
  4. 任何评论都表示赞赏..

    这是典型的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
    

1 个答案:

答案 0 :(得分:0)

用于调查多插槽系统上的内存/缓存:

  • hwloclstopoexample):

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

    numactl --hardware
    numactl --show
    
  • sysfsprocfs

    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