Configuring PMEM Devices

On your Intel Persistent Memory (PMEM) device, use the ipmctl utility to configure the PMEM mode and the ndctl utility for namespace management.

A PMEM device can operate in App Direct mode, Memory Mode, or Mixed Mode. To use OMS, you should configure your PMEM device in the app direct mode by using the BIOS.

  1. In your BIOS, select EDKII, Socket Config, Memory Config, Memory Map, Volatile Mode and set it to 1LM.
  2. Log in as root and check the currently configured capacity:
    $ su -
    # ipmctl show -memoryresources

    The output is similar to the following:

    Capacity=6031.1 GiB
    MemoryCapacity=0.0 GiB
    AppDirectCapacity=6024.0 GiB
    UnconfiguredCapacity=0.0 GiB
    InaccessibleCapacity=7.1 GiB
    ReservedCapacity=0.0 GiB

    In this example, the system has an aggregate capacity of 6024 GB.

  3. Verify if the regions are configured in app direct mode.
    # ipmctl show -region

    The output is similar to the following:

    SocketID | ISetID             | PersistentMemoryType | Capacity  | FreeCapacity | HealthState
    ===============================================================================================
    0x0000   | 0x6efe7f48a7e32ccc | AppDirect            | 3012.0 GiB | 0.0 GiB      | Healthy
    0x0001   | 0x734a7f48bed92ccc | AppDirect            | 3012.0 GiB | 0.0 GiB      | Healthy
    

    In this example, there are two PMEM devices; one per socket. Each PMEM device or region has a capacity of 3012 GB and supports AppDirect mode.

  4. Create the namespace by running the ndctl command for each region. In this example, run the command twice as there are two regions in the preceding example.
    # ndctl create-namespace
    # ndctl create-namespace
  5. Check if the namespaces are created.
    # ndctl list -u

    The output is similar to the following:

    [
      {
        "dev":"namespace1.0",
        "mode":"fsdax",
        "map":"dev",
        "size":"2964.94 GiB (3183.58 GB)",
        "uuid":"b5328de6-959e-4d78-adfa-eb212c0a4e46",
        "sector_size":512,
        "align":2097152,
        "blockdev":"pmem1"
      },
      {
        "dev":"namespace0.0",
        "mode":"fsdax",
        "map":"dev",
        "size":"2964.94 GiB (3183.58 GB)",
        "uuid":"0de896bb-d9a9-4a48-abf8-0cf4e10ceda9",
        "sector_size":512,
        "align":2097152,
        "blockdev":"pmem0"
      }
    ]

    In this example, two namespaces namespace0.0 and namespace1.0 are now available for NUMA nodes 0 and node 1 respectively. The block device paths for namespaces namespace0.0 and namespace1.0 are /dev/pmem0 and /dev/pmem1 respectively.