Friday, April 12, 2019

Managing ASM Power Limit During Disk Re-balance


While adding or removing disks to/from a diskgroup, ASM does a re-balance of allocation units (ASM extents); we can specify a power limit of this re-balance. Power limit is used to handle the workload of re-balancing in a way that it does not interfere the normal operation of our database and does not slow down IO operations. Following are some important points to note about rebalance power limit.
  1. Power limit can be specified using init parameter ASM_POWER_LIMIT. This limit will work globally for ASM and would be considered default value for re-balance for all diskgroups. Default value of this parameter is 1.
  2. Power limit can be specified when we add or drop disk(s) to/from a diskgroup using ALTER DISKGROUP ADD DISK command.
  3. Once rebalance is in progress, you can query v$asm_operation to check the progress of re-balance operation. We can once again use ALTER DISK GROUP command to increase/decrease the power limit.
  4. If compatible.asm parameter for a diskgroup is set less than 11.2.0.2, the maximum power limit that can be specified is 11, and minimum is 0. 11 would mean the fastest re-balance operation, and 0 means to pause the re-balance operation.
  5. If compatible.asm parameter for a diskgroup is set 11.2.0.2 and above, the maximum power limit that can be specified is 1024, and minimum is 0. 1024 would mean the fastest re-balance operation and 0 means to pause the re-balance operation.
  6.  If we see any IO performance issue during re-balance, we can pause the re-balance to set power limit to 0, and then we can again resume the re-balance later by specifying power limit to a non-zero value.
Following are a few examples on a diskgroup with compatible.asm is 11.2.0.1 and thus maximum power limit cannot be more than 11.

Example 1
Adding a disk to a diskgroup without specifying power limit
SQL> alter diskgroup FRA add disk 'ORCL:FRA01';

Diskgroup altered.

SQL>select group_number,operation, power, est_minutes  from v$asm_operation;

GROUP_NUMBER    OPERA      POWER       EST_MINUTES
----- ---------- ----------- -----------------------------------------------
1                                  REBAL        1                  29


Now let’s increase the power limit for the diskgroup FRA.
SQL> alter diskgroup FRA rebalance power 11;

Diskgroup altered.

SQL>select group_number,operation, power, est_minutes  from v$asm_operation;

GROUP_NUMBER    OPERA      POWER       EST_MINUTES
----- ---------- ----------- -----------------------------------------------
1                                  REBAL        11                  8

Example 2
Setting rebalance limit while adding a disk to the diskgroup
SQL> alter diskgroup FRA add disk 'ORCL:FRA01' rebalance power 8;

Diskgroup altered.

SQL> select group_number,operation, power, est_minutes  from v$asm_operation;

GROUP_NUMBER    OPERA      POWER       EST_MINUTES
----- ---------- ----------- -----------------------------------------------
1                                  REBAL        8                   13

Pausing the rebalance by setting power to 0
SQL> alter diskgroup FRA rebalance power 0;

Diskgroup altered.

SQL> select group_number,operation, power, est_minutes  from v$asm_operation;

GROUP_NUMBER    OPERA      POWER       EST_MINUTES
----- ---------- ----------- -----------------------------------------------
1                                  REBAL        0                   



No comments:

Post a Comment

Popular Posts - All Times