Example placement policy when using solid state disks

The following snippet is one possible placement policy for use with solid state disk (SSD)-based tiers.

<?xml version="1.0"?>
<!DOCTYPE PLACEMENT_POLICY SYSTEM "/opt/VRTSvxfs/etc/placement_policy.dtd">
<PLACEMENT_POLICY Version="5.0" Name="SSD_policy">
  <RULE Flags="data" Name="all_files">
    <COMMENT>
      The first two RELOCATEs will do the evacuation
      out of SSDs to create room for any relocations
      into the SSDs by the third RELOCATE. The parameters
      that can be tuned are basically values for PERIOD and
      the values of MIN and/or MAX as the per the case.
      The values for MIN and MAX are treated as multiples of
      average activity over past 24 hour period.
    </COMMENT>
    <SELECT>
      <PATTERN> * </PATTERN>
    </SELECT>

    <CREATE>
      <COMMENT>
        create files on ssdtier, failing which
        create them on other tiers
      </COMMENT>
      <ON>
        <DESTINATION Flags="any">
          <CLASS> ssdtier </CLASS>
        </DESTINATION>
      </ON>
    </CREATE>

    <RELOCATE>
      <COMMENT>
        Move the files out of SSD if their last 3 hour
        write IOTEMP is more than 1.5 times the last
        24 hour average write IOTEMP. The PERIOD is
        purposely shorter than the other RELOCATEs
        because we want to move it out as soon as
        write activity starts peaking. This criteria
        could be used to reduce SSD wear outs.
      </COMMENT>
      <FROM>
        <SOURCE>
          <CLASS> ssdtier </CLASS>
        </SOURCE>
      </FROM>
      <TO>
        <DESTINATION>
          <CLASS> nonssd_tier </CLASS>
        </DESTINATION>
      </TO>
      <WHEN>
        <IOTEMP Type="nwbytes" Average="*">
          <MIN Flags="gt"> 1.5 </MIN>
          <PERIOD Units="hours"> 3 </PERIOD>
        </IOTEMP>
      </WHEN>
    </RELOCATE>

    <RELOCATE>
      <COMMENT>
        OR move the files out of SSD if their last 6 hour
        read IOTEMP is less than half the last 24 hour
        average read IOTEMP. The PERIOD is longer,
        we may want to observe longer periods
        having brought the file in. This avoids quickly
        sending the file out of SSDs once in.
      </COMMENT>
      <FROM>
        <SOURCE>
          <CLASS> ssdtier </CLASS>
        </SOURCE>
      </FROM>
      <TO>
        <DESTINATION>
          <CLASS> nonssd_tier </CLASS>
        </DESTINATION>
      </TO>
      <WHEN>
        <IOTEMP Type="nrbytes" Average="*">
          <MAX Flags="lt"> 0.5 </MAX>
          <PERIOD Units="hours"> 6 </PERIOD>
        </IOTEMP>
      </WHEN>
    </RELOCATE>

    <RELOCATE>
      <COMMENT>
        OR move the files into SSD if their last 3 hour
        read IOTEMP is more than or equal to 1.5 times
        the last 24 hour average read IOTEMP AND
        their last 6 hour write IOTEMP is less than
        half of the last 24 hour average write IOTEMP
      </COMMENT>
      <TO>
        <DESTINATION>
          <CLASS> ssd_tier </CLASS>
        </DESTINATION>
      </TO>
      <WHEN>
        <IOTEMP Type="nrbytes" Prefer="high" Average="*">
          <MIN Flags="gteq"> 1.5 </MIN>
          <PERIOD Units="hours"> 3 </PERIOD>
        </IOTEMP>
        <IOTEMP Type="nwbytes" Average="*">
          <MAX Flags="lt"> 0.5 </MAX>
          <PERIOD Units="hours"> 3 </PERIOD>
        </IOTEMP>
      </WHEN>
    </RELOCATE>
  </RULE>
</PLACEMENT_POLICY>

In this placement policy, new files are created on the SSD tiers if space is available, or elsewhere if space is not available. When enforce is performed, the files that are currently in SSDs whose write activity is increased above a threshold or whose read activity fell below a threshold over a given period are moved out of the SSDs. The first two RELOCATEs capture this intent. However, the files whose read activity intensified above a threshold and whose write activity does not exceed a threshold over the given period are moved into SSDs, while giving preference to files with higher read activity.

The following figure illustrates the behavior of the example placement policy:

The files whose I/O activity falls in the light gray area are good candidates for moving in to SSD storage. These files have less write activity such that they have less impact on wear leveling, and the slower write times to SSDs is less of a factor. These files have intense read activity, which also makes the files ideal for placement on SSDs since read activity does not cause any wear leveling side effects, and reads are faster from SSDs. In contrast, the files whose I/O activity falls in the dark gray area are good candidates to be moved out of SSD storage, since they have more write activity or less read activity. Greater write activity leads to greater wear leveling of the SSDs, and your file system's performance suffers from the slower write times of SSDs. Lesser read activity means that you are not benefitting from the faster read times of SSDs with these files.