Adjust the Oracle rollback speed

Source: Internet
Author: User
The speed of rollback is achieved through the fast_start_parallel_rollback parameter. This parameter dynamically adjusts the parameter fast_start_parallel_rollback.

The speed of rollback is achieved through the fast_start_parallel_rollback parameter. This parameter dynamically adjusts the parameter fast_start_parallel_rollback.

The speed of rollback can be achieved through the fast_start_parallel_rollback parameter, which can be dynamically adjusted.

Regarding the fast_start_parallel_rollback parameter, this parameter determines the number of parallel rollback start times. In a busy system or a system with poor IO performance, a large number of rollback operations will significantly affect the system, you can adjust this parameter to reduce the impact. The official document is defined as follows:

FAST_START_PARALLEL_ROLLBACK specifies the degree of parallelism used when recovering terminated transactions. terminated transactions are transactions that are active before a system failure. if a system fails when there are uncommitted parallel DML or DDL transactions, then you can speed up transaction recovery during startup by using this parameter.

Values:

FALSE

Parallel rollback is disabled

LOW

Limits the maximum degree of parallelism to 2 * CPU_COUNT

HIGH

Limits the maximum degree of parallelism to 4 * CPU_COUNT

If you change the value of this parameter, then transaction reied will be stopped and restarted with the new implied degree of parallelism.

During the rollback process, the rollback progress can be determined through view V $ FAST_START_TRANSACTIONS.

SQL> select usn, state, undoblocksdone, undoblockstotal, CPUTIME, pid, xid, rcvservers from v $ fast_start_transactions;

USN STATE UNDOBLOCKSDONE UNDOBLOCKSTOTAL CPUTIME PID XID RCVSERVERS
-----------------------------------------------------------------------------------------------------
454 RECOVERED 110143 110143 210 01C600210027E0D9 1
468 RECOVERED 430 430 17 01d4002131f3a36 128

USN: The undo segment of the transaction.
STATE: the STATE of the transaction. The optional values are (be recovered, RECOVERED, or RECOVERING)
UNDOBLOCKSDONE: Completed undo Blocks
UNDOBLOCKSTOTAL: Total undo data blocks
CPUTIME: the rollback time, in seconds.
RCVSERVERS: number of parallel rollback Processes

Supplement: query scripts with better rollback time
Sys @ MS4ADB3 (dtydb5)> select undoblockstotal "Total", undoblocksdone "Done", undoblockstotal-undoblocksdone
2 "ToDo", decode (cputime, 0, 'unknown ', to_char (sysdate + (undoblockstotal-undoblocksdone)
3/(undoblocksdone/cputime)/86400), 'yyyy-mm-dd hh24: mi: ss '))
4 "Estimated time to complete", to_char (sysdate, 'yyyy-mm-dd hh24: mi: ss ')
5 from v $ fast_start_transactions;

Total MB Done ToDo Estimated time to complete TO_CHAR (SYSDATE, 'yyyy-MM-DDHH24: MI: ss'
----------------------------------------------------------------------------------------------------------
36,767 36767 0 16:59:19 16:59:19
7,209 7209 0 16:59:19 16:59:19
3,428 3428 0 16:59:19 16:59:19
34,346 1604 32742 17:25:31 16:59:19

The following is a process in which a large number of wait for a undo record wait events are processed.

1. a user uses plsql to execute an insert operation exception, resulting in increasing table space. Therefore, the rollback is stopped manually. After kill, a large number of wait for a undo record records are generated, about 100

2. query the v $ fast_start_transactions view. Because the fast_start_parallel_rollback parameter is set to HIGH and the cpu is 32, the number of parallel processes is 32 × 3 = 128.

SQL> select usn, state, undoblocksdone, undoblockstotal, CPUTIME, pid, xid, rcvservers from v $ fast_start_transactions;

USN STATE UNDOBLOCKSDONE UNDOBLOCKSTOTAL CPUTIME PID XID RCVSERVERS
-----------------------------------------------------------------------------------------------------
454 RECOVERING 26922 464160 103 3744 01C600210027E0D9 128
468 RECOVERED 430 430 17 01d4002131f3a36 128

SQL> SHOW parameter ROLLBACK

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.