2

On my desktop

$ sudo lshw -short -C memory
H/W path              Device     Class       Description
========================================================
/0/0                             memory      64KiB BIOS
/0/27                            memory      16GiB System Memory
/0/27/0                          memory      [empty]
/0/27/1                          memory      8GiB DIMM DDR4 Synchronous Unbuffered (Unregistered) 2133 MHz (0.5 ns)
/0/27/2                          memory      [empty]
/0/27/3                          memory      8GiB DIMM DDR4 Synchronous Unbuffered (Unregistered) 2133 MHz (0.5 ns)
/0/29                            memory      768KiB L1 cache
/0/2a                            memory      4MiB L2 cache
/0/2b                            memory      16MiB L3 cache

shows RAM speed( 2133 MHz ), L2 cache size(4MiB) & L3 cache size(16MiB)

But the same command on AWS EC2 instance

$ sudo lshw -short -C memory
H/W path    Device  Class      Description
==========================================
/0/0                memory     96KiB BIOS
/0/1000             memory     4GiB System Memory
/0/1000/0           memory     4GiB DIMM RAM

and AWS lightsail instance

H/W path    Device  Class      Description
==========================================
/0/0                memory     96KiB BIOS
/0/1000             memory     8GiB System Memory
/0/1000/0           memory     8GiB DIMM RAM

do not show these values.

How is it possible to know these values on AWS EC2 and Lightsail instances?

ewwhite
  • 201,205

3 Answers3

1

What do you need it for?

If it’s to assess performance you won’t learn much from the memory speed. Better run some performance benchmark tool on both and compare the real numbers.

Making any conclusions from host HW specs in a virtual machine is pointless.

MLu
  • 26,247
0

For the memory speed, you could use $ sudo dmidecode -t memory. On a c5n.xlarge ec2 instance, this gives me the following, showing a RAM speed of 2666 MT/s:

# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.

Handle 0x0008, DMI type 16, 23 bytes Physical Memory Array Location: System Board Or Motherboard Use: System Memory Error Correction Type: Unknown Maximum Capacity: 10752 MB Error Information Handle: Not Provided Number Of Devices: 1

Handle 0x0009, DMI type 17, 34 bytes Memory Device Array Handle: 0x0008 Error Information Handle: Not Provided Total Width: 72 bits Data Width: 64 bits Size: 10752 MB Form Factor: DIMM Set: None Locator: Not Specified Bank Locator: Not Specified Type: DDR4 Type Detail: Static Column Pseudo-static Synchronous Window DRAM Speed: 2666 MT/s Manufacturer: Not Specified Serial Number: Not Specified Asset Tag: Not Specified Part Number: Not Specified Rank: Unknown Configured Memory Speed: Unknown

For the caches, I believe you could use $ sudo dmidecode -t cache.

0

you can use comand lscpu command, native for linux. It should show something like:

command return