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
  • 197,159
  • 92
  • 443
  • 809
Siju George
  • 155
  • 9
  • What do you need it for? There are many factors that determine system performance, especially in a shared environment like this, RAM speed won’t tell you much about the overall system speed. – MLu Jan 05 '19 at 20:56

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
  • 24,849
  • 5
  • 59
  • 86
  • I want to find out the difference between the hardware used in EC2 instances and lightsail instances which could give a clue as to how lightsail instances are cheaper. – Siju George Jan 06 '19 at 03:35
  • @SijuGeorge EC2 and Lightsail are for a different target market. I *guess* the Lightsail instances are for example more oversubscribed on the host than EC2, or have lower priority disk I/O, or slower network, or something like that. That’s not something you will find from your desired HW specs. Run a *benchmark* and do your performance-cost analysis based on the real performance numbers. – MLu Jan 06 '19 at 03:41
  • @MLu I realize this is a bit old, and I understand your point above, that said I too would like to be able to determine the amount of L1/L2/L3 cache in an EC2 Environment. Not for comparison between anything, but to simply know how much L1, L2, L3 cache I have. I am running Windows. Task mgr reports "L1 cache: N/A". Is there actually any cache? Thank you. – sse Jan 05 '21 at 13:45
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