Follow

Examples of assigning policies

The examples that a discussed in this article use the following entities:

  • Pool - a pool named p1, containing some volumes
  • Volumes - 3 volumes named v1, v2, v3
  • Host - the host is mapped to all 3 volumes and is capable of writing nearly 30,000 IOPS
  • Policies - several policies with various values of the max_iops parameter, named 9000iops, 5000iops, 3000iops and 1000iops

In order to prepare this article we used:

  • InfiniShell - to create the pool, volumes and policies and to assign and unassign policies to the pool and its entities
  • InfiniMetrics - to view the impact of the policies assignment on the host writes

Preparations

Prior to the policies assignment, we query the volumes to verify that none of them is assigned to a policy.

vol.query pool=p1 --columns=name,policy                                                                                       
NAME      POLICY                                                                      
v1        -                                                                           
v2        -                                                                           
v3        -  

We also query for the policies.

qos_policy.query                                                                                                                                                           
NAME          TYPE                      MAX OPS                  MAX THROUGHPUT  BURST FACTOR                                            
9000iops      POOL_VOLUME                  9000                  -               -                                                       
5000iops      VOLUME                       5000                  -               -                                                       
3000iops      VOLUME                       3000                  -               -                                                       
1000iops      VOLUME                       1000                  -  			 - 

All of the volumes accept host writes. The cumulative 30,000 IOPS are evenly divided among all volumes. The 3 volumes are visible on InfiniMetrics.

Assigning policies to volumes

We assign policies to the volumes:

  • v1 is assigned to a policy with max 5,000 IOPS
  • v2 is assigned to a policy with max 3,000 IOPS
  • v3 is assigned to a policy with max 1,000 IOPS

The following numbered list refer to the numbers on the next image:

2a. The 3 volumes have exactly the same IOPS so the graph lines overlap (only v3 (color purple) is visible)  
2b. When v1 is assigned to a policy that limits the IOPS to 5,000 (from the nearly 10,000 IOPS it accepted to the host prior to the policy assignment), v2 and v3 accept more host writes
2c. When v2 is assigned to a policy that limits the IOPS to 3,000, v3 accepts more writes
2d. v3 is assigned to a policy that limits the IOPS to 1,000 

Shifting the InfiniMetrics to an unstacked (side-by-side) view, we can pin-point at the moment when v1  

Next, the total IOPS that are accepted by the 3 volumes are aligned to 5,000 + 3,000 + 1,000 = 9,000 IOPS.

Unassigning policies from volumes

Next, v1 and v2 are unassigned from their policies. v3 is still abiding by the limitation imposed by its assigned policy. The two other volumes share all of the IOPS the host write. 

Assigning policies to a pool and a volume

We assign two policies, one for a pool and the other to a volume:

  • The pool that the 3 volumes belong to is assigned to a policy with max 9,000 IOPS
  • Volume v2, that was unassigned in the previous step, is assigned to a policy with max 1,000 IOPS (that same policy that v3 is assigned to)

As a result, the total IOPS that are imposed by the policy the pool is assigned to is 9,000. This number is divided between volumes v2 and v3 that are assigned to a policy, and volume 1 that is not assigned to a policy.

Unassigning all of the volumes

When the volumes are unassigned from their policies, the pool is still assigned to its policy. Thus, the volumes accept 9,000 IOPS that are equally divided between them (3,000 IOPs to each volume).

Unassigning the pool

When the pool is unassigned from its policy, the volumes are capable of accepting all of the available host writes. 

Was this article helpful?
0 out of 0 found this helpful

0 out of 0 found this helpful

Comments