linux – 超级线程cpu的/ proc / cpuinfo中“cpu MHz”字段是什么意思?

CPU为i7-3770@3.40GHz.它有4个核心,每个核心有2个线程.这是dmidecode输出:

# dmidecode -t 4
# dmidecode 2.9
SMBIOS 2.7 present.

Handle 0x0042, DMI type 4, 42 bytes
Processor Information
    Socket Designation: SOCKET 0
    Type: Central Processor
    Family: <OUT OF SPEC>
    Manufacturer: Intel(R) Corporation
    ID: A9 06 03 00 FF FB EB BF
    Version: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
    Voltage: 1.1 V
    External Clock: 100 MHz
    Max Speed: 3800 MHz
    Current Speed: 3400 MHz
    Status: Populated, Enabled
    Upgrade: <OUT OF SPEC>
    L1 Cache Handle: 0x003F
    L2 Cache Handle: 0x003E
    L3 Cache Handle: 0x0040
    Serial Number: Not Specified
    Asset Tag: Fill By OEM
    Part Number: Fill By OEM
    Core Count: 4
    Core Enabled: 4
    Thread Count: 8
    Characteristics:
        64-bit capable

它将是系统中的8个逻辑核心,就像/ proc / cpuinfo中显示的那样.但任何人都能说出为什么核心的CPU频率为1600MHz?我猜核心中有2个线程,所以hw线程频率可能大约是核心的一半?这个数字是如何计算的?

processor   : 7
vendor_id   : GenuineIntel
cpu family  : 6
model       : 58
model name  : Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
stepping    : 9
cpu MHz     : 1600.000
cache size  : 8192 KB
physical id : 0
siblings    : 8
core id     : 3
cpu cores   : 4
apicid      : 7
initial apicid  : 7
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 x2apic popcnt aes xsave avx lahf_lm ida arat tpr_shadow vnmi flexpriority ept vpid
bogomips    : 7013.49
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

此外,这是lshw和lscpu命令的输出.还提到1600MHz.

lshw信息:

#lshw -class processor
  *-cpu                   
       description: CPU
       product: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
       vendor: Intel Corp.
       physical id: 42
       bus info: cpu@0
       version: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
       slot: SOCKET 0
       size: 1600MHz
       capacity: 3800MHz
       width: 64 bits
       clock: 100MHz
       capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp x86-64 constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 x2apic popcnt aes xsave avx lahf_lm ida arat tpr_shadow vnmi flexpriority ept vpid cpufreq

lscpu信息:

#lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
CPU(s):                8
Thread(s) per core:    2
Core(s) per socket:    4
CPU socket(s):         1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 58
Stepping:              9
CPU MHz:               1600.000
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              8192K

解决方法:

现代cpu可以在几个不同的频率上动态变化
在负载要求下(见wikipedia).英特尔称此为SpeedStep.当cpu几乎没有用时,它将以较低的频率运行以降低功率(因此降低热量和风扇噪音).

所以你看到的1600Mhz可能是因为所有cpus没有做太多,但它可以升到最大值,如cpu和主板架构以及温度决定的3400 Mhz.

我不确定/ proc / cpuinfo从哪里获取单个值,但是
您可以在files / sys / devices / system / cpu / cpu * / cpufreq /中查看单个cpu信息,例如当前频率:

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq

并阅读archlinux中有关Linux cpu频率缩放软件的更多信息.

上一篇:linux – 我系统中处理器和核心的数量


下一篇:Java-Android AlarmManager服务