Skip to main content

Move between secondary compression and adaptive compression

Contributors netapp-mwallis netapp-dbagwell netapp-aherbin

You can switch between secondary compression and adaptive compression depending on the amount of data reads. Adaptive compression is preferred when there are a high volume of random reads on the system and higher performance is required. Secondary compression is preferred when data is written sequentially and higher compression savings are required.

About this task

The default compression type is selected based on your aggregates and platform.

Steps
  1. Disable efficiency on the volume:

    volume efficiency off

    For example, the following command disables efficiency on volume vol1:

    volume efficiency off -vserver vs1 -volume vol1

  2. Change to the advanced privilege level:

    set -privilege advanced

  3. Decompress the compressed data:

    volume efficiency undo

    For example, the following command decompresses the compressed data on volume vol1:

    volume efficiency undo -vserver vs1 -volume vol1 -compression true

    Note

    You must verify that you have sufficient space in the volume to accommodate the decompressed data.

  4. Change to the admin privilege level:

    set -privilege admin

  5. Verify that the status of the operation is idle:

    volume efficiency show

    For example, the following command displays the status of an efficiency operation on volume vol1:

    volume efficiency show -vserver vs1 -volume vol1

  6. Enable efficiency for the volume:

    volume efficiency on For example, the following command enables efficiency on volume vol1:

    volume efficiency on -vserver vs1 -volume vol1

  7. Enable data compression, and then set the type of compression:

    volume efficiency modify

    For example, the following command enables data compression and sets the compression type as secondary compression on volume vol1:

    volume efficiency modify -vserver vs1 -volume vol1 -compression true -compression-type secondary

    Note

    This step only enables secondary compression on the volume; the data on the volume is not compressed.

    • To compress existing data on AFF systems, you must run the background compression scanner.

    • To compress existing data on Flash Pool aggregates or HDD aggregates, you must run the background compression.

  8. Optional: Enable inline compression:

    volume efficiency modify

    For example, the following command enables inline compression on volume vol1:

    volume efficiency modify -vserver vs1 -volume vol1 -inline-compression true