Verifying the VxFS cache area and monitoring the caching

After the SmartIO feature is configured, you can verify that the cache area is present and that caching is occurring.

For a VxFS cache area, the sfcache list command shows the caching mode for the file or directory. If the mode is not explicitly set, the file or directory inherits the caching mode of the mount point. If the mode is explicitly set for a file or directory, that value persists across remounts. The displayed caching mode may differ from the mode that is enabled for the mount point. The writeback mode is not enabled unless the file system is mounted in writeback mode. If a file or directory is set to writeback mode, but the file system is mounted in another mode, the file or directory inherits the caching mode of the mount point.

To verify and monitor the cache area

  1. Use the following command to display information about the cache areas on the system.
    # sfcache list
    NAME          TYPE SIZE  ASSOC-TYPE  STATE   DEVICE 
    sfcachearea_2 VxFS 31.97g AUTO        ONLINE  ssd0_0
  2. Use the following command to display information about a specific cache area.
    # sfcache list sfcachearea_2
    Cachearea: sfcachearea_2
    Assoc Type: AUTO
    Type: VxFS
    Size: 9.96g
    State: ONLINE
    Layout: CONCAT
    Number of Columns: 0
    
    /dev/vx/dsk/sfcache_defaultdg/sfcachearea_2:
    FSUUID                                  SIZE    MODE  MOUNTPOINT
    3671ff51-9696-0000-872c-000056bcb408 39.0 MB    read  /mnt1
  3. To display information about a specific file system:
    # sfcache list /mnt1
    /mnt1:
    READ CACHE    WRITEBACK    MODE    PINNED  NAME
       39.0 MB         0 KB    read    yes     /mnt1/dir
       39.0 MB         0 KB    read    yes     /mnt1
  4. To see statistics on the cache usage, use the following command:
    # sfcache stat /mnt1
    Cache Size:    9.97 GB
    Cache Utilization:    39.0 MB ( 0.38 %)
    
    Read Cache
    Hit Ratio    Data Read    Data Written
    
    /mnt2:
       0.00 %         0 KB         39.0 MB

    The output displays statistics for the cached data.

    See Viewing the SmartIO cache statistics .