Tutorial
Handle predictive dynamic memory deallocation in baseboard management controller (BMC)
Configure and manage predictive dynamic memory deallocation for improved system reliabilityIntroduction
Dynamic memory deallocation is an important reliability, availability, and serviceability (RAS) feature of the IBM Power server. It is a hypervisor mechanism to remove memory pages from the available address space when there is a memory-related failure. These can include predictive memory errors, where temporary but recoverable memory errors occur. The current approach is to dynamically deallocate an entire memory interleave group when the predictive memory fails.
For customers concerned about memory loss for various Power10 platforms due to predictive memory degrade, a new interface for the customer is introduced to disable the dynamic memory deallocation only for predictive memory failures. Consult with the IBM support team before disabling dynamic memory deallocations.
This tutorial explains how to configure predictive dynamic memory deallocation in various ways and its advantages.
How does it work?
Dynamic memory deallocation is used to help protect customers with degraded or failed dual inline memory module (DIMM) modules until the hardware is deconfigured (or replaced). At the host operating state if the processor runtime diagnostics encounters any DIMM, OpenCAPI memory interface (OMI), or OpenCAPI memory buffer (OCMB) predictive memory errors, it checks if free memory is available and then sends the request to the hypervisor to dynamically deallocate the memory pages associated with the failure. If the hypervisor does not have enough memory to completely deallocate the degraded memory at run time, the partition will continue to use this memory until it is rebooted. This leads to a loss of available memory space either at run time or after a partition is rebooted. The new option available to disable the dynamic memory deallocation prevents the hypervisor memory moves when a predictive memory error occurs at host run time. Note that for fatal memory errors, the hypervisor reboots and deconfigures the faulty resources, regardless of whether the predictive dynamic memory deallocation option is enabled or disabled.
Predictive dynamic memory deallocation configuration methods
By default, the predictive dynamic memory deallocation is enabled on the power server. This section explains different approaches in which we can set predictive dynamic memory deallocation. The settings made will be applied only after the server power is turned on.
Set predictive dynamic memory deallocation using the BMC GUI
Perform the following steps to enable or disable predictive dynamic memory deallocation using the BMC GUI:
- Log in to the BMC GUI using a valid username and password.
Note: GUI settings must be made only when the server is in the power off state. - In the navigation panel, click Resource management > Memory > Predictive dynamic memory deallocation.
- Finally, use the toggle to enable or disable predictive dynamic memory allocation.

Set predictive dynamic memory deallocation using the Redfish API
The BMC uses the hb_predictive_mem_guard BIOS attribute through the Redfish API to enable or disable predictive dynamic memory deallocation.
Run the following command to enable predictive dynamic memory deallocation:
curl -k -H "X-Auth-Token: <bmc_token>” -H "Content-Type: application/json" -X PATCH https://<BMC_IP>/redfish/v1/Systems/system/Bios/Settings -d '{"Attributes":{"hb_predictive_mem_guard":"Enabled"}}'
Run the following command to disable predictive dynamic memory deallocation:
curl -k -H "X-Auth-Token: <bmc_token>” -H "Content-Type: application/json" -X PATCH https://<BMC_IP>/redfish/v1/Systems/system/Bios/Settings -d '{"Attributes":{"hb_predictive_mem_guard":"Disabled"}}'
Set predictive dynamic memory deallocation using the BMC CLI
Run the following command to get the current settings:
pldmtool bios GetBIOSAttributeCurrentValueByHandle -a hb_predictive_mem_guard
Use the following pldmtool command with the option set to either Enabled or Disabled in the BMC CLI to enable or disable predictive dynamic memory deallocation:
pldmtool bios SetBIOSAttributeCurrentValue -a hb_predictive_mem_guard -d <option>
Conclusion
This tutorial highlights a new option that has been implemented as a key customer requirement for Power servers, allowing users to disable predictive memory deallocation and reduce the system downtime in the customer environment when a predictive memory error is detected.