Go to main content

Managing ZFS File Systems in Oracle® Solaris 11.4

Exit Print View

Updated: July 2019
 
 

Setting I/O Bandwidth Limits

Setting the size of a ZFS dataset can ensure an appropriate allocation of space in a configuration that contains multiple volumes to service different ZFS clients. However, ZFS clients of a specific dataset can still monopolize the system's bandwidth if the I/O operations within the dataset surpasses those operations in other datasets. Monopoly of bandwidth use effectively denies other ZFS clients of other datasets from accessing the data. By using the read and write limiting properties, you can assign limits to the I/O operations in datasets to provide bandwidth to all datasets for their respective clients to use.

  • writelimit - sets the maximum bytes per second that a dataset can write to disk

  • readlimit - sets the maximum bytes per second that a dataset can read from a disk

  • defaultwritelimit - sets the maximum bytes per second that the decendants of a dataset can write to disk

  • defaultreadlimit - sets the maximum bytes per second that the decendants of a dataset can read from a disk

  • effectivewritelimit - reports the maximum bytes per second that a dataset can write to disk

  • effectivereadlimit - reports the maximum bytes per second that a dataset can read from a disk


Note -  These values are not guaranteed bandwidth and the actual bandwidth may be limited by other factors including usage and limits set on other datasets in the hierarchy. Enforcement of these limits may be delayed by several seconds.

The default limits on the decendants of a dataset can be overwritten with the writelimit or readlimit properties. They can be set to any value, but the throughput on a decendant dataset will not be more than the rate of a parent dataset. The minimum value for these properties is 500K.

$ zfs get -r writelimit,defaultwritelimit,effectivewritelimit users/home
NAME                  PROPERTY              VALUE     SOURCE
users/home            writelimit            default   default
users/home            defaultwritelimit     none      default
users/home            effectivewritelimit   none      local
users/home/cindy      writelimit            default   default
users/home/cindy      defaultwritelimit     none      default
users/home/cindy      effectivewritelimit   none      local

The writelimit or readlimit properties can be set to none to inherit the limit set on the parent dataset. Also they can be set to default to use the default limit set on the parent dataset.

Example 32  Default Settings for Bandwidth Limiting Properties

If a new dataset is created, it uses the bandwidth limits established by the parent dataset. In this example, the parent dataset had no bandwidth limiting properties set.

$ zfs get -r writelimit,defaultwritelimit,effectivewritelimit users/home
NAME                 PROPERTY              VALUE     SOURCE
users/home           writelimit            default   default
users/home           defaultwritelimit     none      default
users/home           effectivewritelimit   none      local
users/home/neil      writelimit            default   default
users/home/neil      defaultwritelimit     none      default
users/home/neil      effectivewritelimit   none      local

In this example. the parents' defaultwritelimit properties was set to 500K, so that is the effective write limit for the decendant dataset.

$ zfs get -r writelimit,defaultwritelimit,effectivewritelimit users/home
NAME                 PROPERTY              VALUE     SOURCE
users/home           writelimit            1M        local
users/home           defaultwritelimit     500K      local
users/home           effectivewritelimit   1M        local
users/home/neil      writelimit            default   default
users/home/neil      defaultwritelimit     500K      inherited from users/home
users/home/neil      effectivewritelimit   500K      local
Example 33  Using the Bandwidth Limiting Properties From the Parent Dataset

By default, descendant datasets use the bandwidth limiting values set in the parents' defaultwritelimit and defaultreadlimit properties. If you want to use the same write values as the parent dataset instead of the default settings, set the writelimit property for the descendant dataset to none. In this case, the effective write limit will be reported as the same as the parent datasets' writelimit property. In this example the effective write limit for the decendant dataset is 1M which is the effective write limit of the parent, instead of 500K which is the default write limit set in the parent dataset.

$ zfs set writelimit=none users/home/cindy
$ zfs get -r writelimit,defaultwritelimit,effectivewritelimit users/home
NAME                  PROPERTY              VALUE    SOURCE
users/home            writelimit            1M       local
users/home            defaultwritelimit     500K     local
users/home            effectivewritelimit   1M       local
users/home/cindy      writelimit            none     local
users/home/cindy      defaultwritelimit     500K     inherited from users/home
users/home/cindy      effectivewritelimit   1M       local

In this example, the decendants' properties are limited by the write limit set by on the parent dataset. The descendant dataset will not be given higher bandwidth values than the parent.

$ zfs create -o writelimit=2M users/home/mark
$ zfs get -r writelimit,defaultwritelimit,effectivewritelimit users/home
NAME                 PROPERTY              VALUE    SOURCE
users/home           writelimit            1M       local
users/home           defaultwritelimit     500K     local
users/home           effectivewritelimit   1M       local
users/home/mark      writelimit            2M       local
users/home/mark      defaultwritelimit     500K     inherited from users/home
users/home/mark      effectivewritelimit   1M       local