API not reporting correct memory information

Bug #1659917 reported by Newell Jensen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS RSD
Won't Fix
Medium
Priyank Durugkar

Bug Description

Intel RSD API is not reporting the correct memory information.

After allocating a node it lists the total memory as 30 GiB from TotalSystemMemory (via Systems endpoint). Going further down we can look at the MiB amount in the Memory endpoint for each System endpoint. The returned JSON for this is seen below:

root@maas:~# curl -s -k -u admin:admin -X GET https://10.3.0.1:8443/redfish/v1/Systems/113/Memory/376
{
  "@odata.context" : "/redfish/v1/$metadata#Systems/Members/113/Memory/Members/$entity",
  "@odata.id" : "/redfish/v1/Systems/113/Memory/376",
  "@odata.type" : "#Memory.1.0.0.Memory",
  "Name" : "Memory",
  "Id" : "376",
  "Description" : "Memory description",
  "MemoryType" : "DRAM",
  "MemoryDeviceType" : "DDR",
  "BaseModuleType" : "RDIMM",
  "MemoryMedia" : [ "DRAM" ],
  "CapacityMiB" : 7812,
  "DataWidthBits" : 64,
  "BusWidthBits" : 72,
  "Manufacturer" : "Micron",
  "SerialNumber" : "0D861391",
  "PartNumber" : "18ASF1G72PZ-2G1A2",
  "AllowedSpeedsMHz" : [ ],
  "FirmwareRevision" : null,
  "FirmwareApiVersion" : null,
  "FunctionClasses" : [ ],
  "VendorID" : null,
  "DeviceID" : null,
  "RankCount" : null,
  "DeviceLocator" : "B0",
  "MemoryLocation" : null,
  "ErrorCorrection" : null,
  "Status" : {
    "State" : "Enabled",
    "Health" : "OK",
    "HealthRollup" : null
  },
  "OperatingSpeedMhz" : 2133,
  "Regions" : [ {
    "RegionId" : "0",
    "MemoryClassification" : null,
    "OffsetMiB" : 0,
    "SizeMiB" : 7812
  } ],
  "OperatingMemoryModes" : [ ],
  "Oem" : {
    "Intel_RackScale" : {
      "@odata.type" : "#Intel.Oem.Memory",
      "VoltageVolt" : 1.2
    }
  }
}

There are 3 other memory modules for this system so a total of 7812 * 4 = 31248
This divided by 1024 (for MiB to GiB) with truncation gives 30 GiB.
However, when MAAS commissions this machine it finds 32 GiB in total. We then deployed the machine and when I SSH'd into the machine we found this:

ubuntu@amused-serval:~$ free -m
              total used free shared buff/cache available
Mem: 32064 278 31377 9 408 31375
Swap: 8191 0 8191

This shows us there is actually 32 GiB in total. We think part of the reason this is happening is perhaps with Deep Discovery the kernel memory is not taken into account of the total amount.

Revision history for this message
Ryan Terpstra (rterpstra) wrote :

The POD Manager conforms to Redfish. In the Redfish specification the memory value is reports as GiB (Gibibytes) and MiB (Mibibytes). The total system meemory is a sum of each individual DIMM. In the API you will see four DIMMs listed as 7812 MiB. Combined these are 30.52 GiB. The 1.2 API rounds down to 30GiB.

Revision history for this message
Ryan Terpstra (rterpstra) wrote :

It does appear that the PSME reference code is performing an unnecessary conversion on the DIMM data from the SMBIOS table.

Per the DMTF SMBIOS spec, the reported memory size is a power of 2 (which means it is a Mebibyte). The spec labels the result as "MB" rather than "MiB" (IEC notation) which led to developers understanding the result as Megabytes.

The issue is specific to the GAMI layer in our reference code, and not a universal error in RSD. I will update when I have more details on plan/fix for this on our SDV.

Revision history for this message
Raghuram Kota (rkota) wrote :

@Ryan, @Newell : Since this won't be fixed in 1.2 version of RSD for SDV, is it ok to mark this as "Won't Fix" and close this out ? Thx.

Revision history for this message
Newell Jensen (newell-jensen) wrote :

As this is specific to the SDV hardware, and not a bug with RSD itself, setting to "Wont' Fix" to close this out.

Changed in maasrsd:
status: Confirmed → Won't Fix
Raghuram Kota (rkota)
Changed in maasrsd:
milestone: alpha → out-of-scope
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.