Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS EC2: The number of cpu cores available on an instance

I have recently set up an instance (m4.4xlarge).

when I execute 'lscpu' command, the output looks something like the following:

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
      .
      .
      .

Does this mean that only 8 cores can be utilized?

If so, what are the rest of CPUs for?

like image 729
d-_-b Avatar asked Dec 02 '15 03:12

d-_-b


People also ask

How many cores does an AWS CPU have?

m4. 4xlarge instances have 16 logical CPUs, so it looks like your EC2 instance is reporting it as having a single socket, with 1 physical CPU that has 8 cores. Each core can execute two threads simultaneously (Intel Hyperthreading technology) so each core is presented as 2 logical CPUs.

Is AWS vCPU a core?

Each vCPU is a thread of a CPU core, except for T2 instances and instances powered by AWS Graviton2 processors. In most cases, there is an Amazon EC2 instance type that has a combination of memory and number of vCPUs to suit your workloads.


1 Answers

m4.4xlarge instances have 16 logical CPUs, so it looks like your EC2 instance is reporting it as having a single socket, with 1 physical CPU that has 8 cores. Each core can execute two threads simultaneously (Intel Hyperthreading technology) so each core is presented as 2 logical CPUs.

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
like image 157
逆さま Avatar answered Oct 14 '22 18:10

逆さま