Monday, November 11, 2013

How to optimize disk read performance in NETAPP DataONTAP

Issue:
Read performance on a LUN presented by a Netapp controller is becoming increasingly sluggish or slow.  You may have noticed high latency times (20ms or higher) or the latency of the LUN has steadily increased over time as in the examples shown below.

Example graph showing latency trending over time

Example output from the stats show command placed in a table for ease of display.

avg_latency
Instance
ms
/vol/volume_name/lun1-Xn/8W3OdfJbw
28.12
/vol/volume_name/lun1-Xn/8W3OdfJbw
9.36
/vol/volume_name/lun1-Xn/8W3OdfJbw
11.38
/vol/volume_name/lun1-Xn/8W3OdfJbw
28.27
/vol/volume_name/lun1-Xn/8W3OdfJbw
22.88
/vol/volume_name/lun1-Xn/8W3OdfJbw
11.75
/vol/volume_name/lun1-Xn/8W3OdfJbw
14.6

Causes:
Just like all other file systems the WAFL file system used by Data Ontap can be a victim of fragmentation in very large files and LUNs.  Most likely your LUN (aka a single large file) has become fragmented and you should perform a defragmentation by running the reallocate command against the LUN or volume.

Solution:
Run the following command against the LUN to check for fragmentation.
reallocate measure -o /vol/volume_name/lun

Check the status by using this command
reallocate status

Example output
/vol/volume_name/lun
        State: Checking: snap 0, public inode 101, block 943500 of 19661543
     Schedule: n/a
     Interval: 1 day
 Optimization: 5 [hot-spots: 18]
  Measure Log: n/a

The optimization scale is from 1(optimized) to 10 (very un-optimized) and is how the WAFL file system identifies fragmentation.  The usually accepted minimum threshold for optimization is 3 or 4 with no hot spots.

To defragment and optimize the LUN run the following command
reallocate start -f -p /vol/volume_name/lun

The -f (force) option performs a one-time full reallocation of a file, LUN or an entire volume.
The -p option reduces the extra storage requirements in a flexible volume when reallocation is run on a volume with snapshots.

No comments:

Post a Comment