Pythian Blog: Technical Track

Oracle ASM rebalance - Turn it up. To 11?

  If you've ever seen or heard of the movie This is Spinal Tap then you have likely heard the phrase Turn it up to 11. Why bring this up? When ASM was introduced as a method for configuring storage for Oracle, one of the features was the ability to rebalance the data across all disks when disks were added or replaced. The value used to control how aggressively Oracle rebalances the disks is the REBALANCE POWER. And yes, the maximum value for rebalancing was 11, as an homage to the movie. Here is an example of a command to only rebalance a disk group: [code language="SQL"] alter diskgroup data rebalance power 11; [/code] That is rather straightforward, so why blog about it? The reason is that the maximum value for REBALANCE POWER changed with Oracle 11.2.0.2, as per the documentation for the ASM_POWER_LIMIT parameter. From 11.2.0.2, the maximum value is no longer 11, but 1024. I've asked a number of DBA's about this, and it seems that knowledge of the rebalance power limit is not really too well known. Why does it matter? Imagine that an 11.2.0.4 ASM diskgroup has had disks replaced, and the task took longer than expected. Now you want to speed up the rebalance of the disk group as much as possible: [code language="SQL"] alter diskgroup data rebalance power 11; [/code] Will that bit of SQL do the job? On 10g that would be fine. But on an 11.2.0.4 database that would set the POWER limit to 1.07% of the maximum allowed value, having little effect on how aggressive Oracle would be in rebalancing the disks. The correct SQL in this case would be: [code language="SQL"] alter diskgroup data rebalance power 1024; [/code] The following is a short demonstration of REBALANCE POWER on 10.2.0.4, 11.2.0.2 and 12.1.0.2 databases. These examples just confirm the documented maximum values for REBALANCE POWER. [code language="SQL"] SQL> select version from v$instance; VERSION ----------------- 10.2.0.4.0 SQL> alter diskgroup ASM_COOKED_FS rebalance power 12; alter diskgroup ASM_COOKED_FS rebalance power 12 * ERROR at line 1: ORA-15102: invalid POWER expression SQL> alter diskgroup ASM_COOKED_FS rebalance power 11; Diskgroup altered. ################################################ SQL> select version from v$instance; VERSION ----------------- 11.2.0.2.0 SQL> alter diskgroup fra rebalance power 1025; alter diskgroup fra rebalance power 1025 * ERROR at line 1: ORA-15102: invalid POWER expression SQL> alter diskgroup fra rebalance power 1024; Diskgroup altered. ################################################ SQL> select version from v$instance; VERSION ----------------- 12.1.0.2.0 SQL> alter diskgroup data rebalance power 1025; alter diskgroup data rebalance power 1025 * ERROR at line 1: ORA-15102: invalid POWER expression SQL> alter diskgroup data rebalance power 1024; Diskgroup altered. [/code]   Discover more about our expertise in the world of Oracle.

No Comments Yet

Let us know what you think

Subscribe by email