Previous page

Next page

Locate page in Contents

Print this page

Configuring the Number of I/O Operations Per Second

In Parallels Cloud Server, you can limit the maximum number of disk input and output operations per second virtual machines and Containers are allowed to perform (known as the IOPS limit). You may consider setting the IOPS limit for virtual machines and Containers with high disk activities to ensure that they do not affect the performance of other virtual machines and Containers on the Node.

Note: By default all I/O inside Containers is cached and the direct access flag ( O_DIRECT ) is ignored when opening files. This significantly reduces the number of IOPS required for Container workload and helps avoid I/O bottlenecks on the Node. For instructions on how to configure honoring of the O_DIRECT flag inside Containers, see Setting the Direct Access Flag inside Containers below.

By default, IOPS is not limited for newly created virtual machines and Containers. To set the IOPS limit, you can use the --iopslimit option of the prlctl set command. For example, to allow Container 101 and the MyVM virtual machine to perform no more than 100 disk I/O operations per second, you can run the following commands:

# prlctl set 101 --iopslimit 100

# prlctl set MyVM --iopslimit 100

To ensure that the IOPS limit has been successfully applied to Container 101 and the MyVM virtual machine, use the pstat -A command:

# pstat -A

ST IOUSED IOWAIT IO IOPS NAME

OK 0.00 0.00 0.0/---KB/s 0.0/100/s MyVM

OK 0.00 0.00 0.0/---KB/s 0.0/100/s 101

The IOPS column shows the IOPS limits currently applied to Container 101 and the MyVM virtual machine.

At any time, you can remove the set IOPS limits by running these commands:

# prlctl set 101 --iopslimit 0

# prlctl set MyVM --iopslimit 0

Setting the Direct Access Flag inside Containers

You can configure honoring of the O_DIRECT flag inside Containers with the sysctl parameter fs.odirect_enable :

  • To ignore the O_DIRECT flag inside a Container, set fs.odirect_enable to 0 in that Container.
  • To honor the O_DIRECT flag inside the Container, set fs.odirect_enable to 1 in that Container.
  • To have a Container inherit the setting from the Hardware Node, set fs.odirect_enable to 2 in that Container (default value). On the Hardware Node, fs.odirect_enable is 0 by default.

    Note: The fs.odirect_enable parameter on the Node only affects honoring of the O_DIRECT flag in Containers and not on the Node itself where the O_DIRECT flag is always honored.