AWS EC2:实例上可用的cpu核心数

时间:2015-12-02 03:14:49

标签: amazon-web-services amazon-ec2 cpu cpu-usage cpu-cores

我最近设置了一个实例(m4.4xlarge)。

当我执行' lscpu'命令,输出类似于以下内容:

CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                16
On-line CPU(s) list:   0-15
Thread(s) per core:    2
Core(s) per socket:    8
CPU socket(s):         1
      .
      .
      .

这是否意味着只能使用8个核心?

如果是这样,其余的CPU是什么?

1 个答案:

答案 0 :(得分:18)

m4.4xlarge个实例有16个逻辑 CPU,因此看起来您的EC2实例将其报告为具有单个套接字,其中1个物理CPU具有8个核心。每个内核可以同时执行两个线程(英特尔超线程技术),因此每个内核都显示为2个逻辑CPU。

CPU(s):                16 <- logical CPUs (Threads per core * Cores per socket)
On-line CPU(s) list:   0-15
Thread(s) per core:    2  <- Each core has hyperthreading and presents
                             itself as two logical CPUs
Core(s) per socket:    8  <- Instance sees it has 8-core physical CPU per socket
CPU socket(s):         1  <- Instance sees it has 1 physical CPU