3.5.3.1 Enable Write-Back PMEM Cache

Write-back PMEM cache is only supported in conjunction with write-back flash cache. Consequently, to enable write-back PMEM cache you must also enable write-back flash cache.

Note:

Commencing with Oracle Exadata System Software release 23.1.0, you cannot enable write-back PMEM cache because PMEM cache only operates in write-through mode.

Note:

To reduce the performance impact on your applications, change the cache mode during a period of reduced workload.

The following command examples use a text file named cell_group that contains the host names of the storage servers that are the subject of the procedure.

  1. Check the current flash cache mode setting (flashCacheMode):
    # dcli –l root –g cell_group cellcli -e "list cell detail" | grep flashCacheMode
  2. If the flash cache is in write-back mode:
    1. Validate that all the physical disks are in NORMAL state before modifying the flash cache.
      # dcli –l root –g cell_group cellcli –e "LIST PHYSICALDISK ATTRIBUTES name,status" | grep –v NORMAL
      The command should return no rows.
    2. Determine amount of dirty data in the flash cache.
      # dcli –g cell_group –l root cellcli -e "LIST METRICCURRENT ATTRIBUTES name,metricvalue WHERE name LIKE \'FC_BY_DIRTY.*\' "
    3. Flush the flash cache.

      If the flash cache utilizes all available flash cell disks, you can use the ALL keyword instead of listing the flash disks.

      # dcli –g cell_group –l root cellcli -e "ALTER FLASHCACHE CELLDISK=\'FD_02_dm01celadm12,
      FD_03_dm01celadm12,FD_00_dm01celadm12,FD_01_dm01celadm12\' FLUSH"
    4. Check the progress of the flash cache flush operation.

      The flushing process is complete when the metric FC_BY_DIRTY is zero.

      # dcli -g cell_group -l root cellcli -e "LIST METRICCURRENT ATTRIBUTES name, metricvalue WHERE name LIKE \'FC_BY_DIRTY.*\' " 

      Or, you can check to see if the attribute flushstatus is set to Completed.

      # dcli -g cell_group -l root cellcli -e "LIST CELLDISK ATTRIBUTES name, flushstatus, flusherror" | grep FD 
    5. After the flash cache is flushed, drop the flash cache.
      # dcli -g cell_group -l root cellcli -e "drop flashcache" 
    6. Modify the cell to use flash cache in write-back mode.
      # dcli -g cell_group -l root cellcli -e "ALTER CELL flashCacheMode=writeback"
    7. Re-create the flash cache.

      If the flash cache utilizes all available flash cell disks, you can use the ALL keyword instead of listing the cell disks.

      If the size attribute is not specified, then the flash cache consumes all available space on each cell disk.

      # dcli –l root –g cell_group cellcli -e "create flashcache celldisk=\'FD_02_dm01celadm12,
      FD_03_dm01celadm12,FD_00_dm01celadm12,FD_01_dm01celadm12\'
    8. Verify that flashCacheMode is set to writeback.
      # dcli –l root –g cell_group cellcli -e "list cell detail" | grep flashCacheMode
  3. Flush the PMEM cache.

    If the PMEM cache utilizes all available PMEM cell disks, you can use the ALL keyword as shown here.

    # dcli –l root –g cell_group cellcli -e "ALTER PMEMCACHE ALL FLUSH"

    Otherwise, list the specific disks using the CELLDISK="cdisk1 [,cdisk2] ..." clause.

  4. Drop the PMEM cache.
    # dcli –l root –g cell_group cellcli -e "DROP PMEMCACHE"
  5. Modify the cell to use PMEM cache in write-back mode.
    # dcli –l root –g cell_group cellcli -e "ALTER CELL pmemCacheMode=WriteBack"

    Starting with Oracle Exadata System Software release 20.1.0, this command warns about the best practice recommendation to use PMEM cache in write-through mode and prompts for confirmation of the change.

  6. Re-create the PMEM cache.

    If the PMEM cache utilizes all available PMEM cell disks, you can use the ALL keyword as shown here. Otherwise, list the specific disks using the CELLDISK="cdisk1 [,cdisk2] ..." clause. If the size attribute is not specified, then the PMEM cache consumes all available space on each cell disk.

    # dcli –l root –g cell_group cellcli -e "CREATE PMEMCACHE ALL"
  7. Verify that pmemCacheMode is set to writeback.
    # dcli –l root –g cell_group cellcli -e "list cell detail" | grep pmemCacheMode