What’s compact phase during Oracle ASM rebalance?

The compact phase is part of Oracle ASM rebalance operation, it moves the data as close as possible to the outer tracks of the disks (the lower numbered offsets).

The first time you run rebalance with 11g, it could take a while if the disk group configuration changed (especially via ADD DISK) when running with 10g ASM. Subsequent manual rebalance without a configuration change should not take as much time.

A disk group where the compact phase of rebalance has done a lot of work will tend to have better performance than the pre-compact disk group. The data should be clustered near the higher performing tracks of the disk, resulting less seektime . It’s enabled by default from 11g onwards.It generally takes place at the end of rebalance operation.

Before 12c, we cannot see compact phase on v$asm_operation view at asm level. If one see EST_MINUTES shows as ‘0’ and waiting for long time, probably its is doing compact. This can be confirmed by seeing system state dump from ASM level and mostly we will see no blocking session and waits are “kfk:async IO”

From 12c onwards, we can see compact phase as separate operation . Compact phase can be disabled. Before 12c, use hidden parameter _disable_rebalance_compact=true at instance level .

From 12c onwards, _disable_rebalance_compact parameter is no longer available, however Diskgroup attribute _rebalance_compact can be used:

SQL> ALTER DISKGROUP DATA SET ATTRIBUTE ‘_rebalance_compact’=’FALSE’;

Leave a comment