引數fast_start_parallel_rollback調整oracle回滾的速度
https://blog.csdn.net/hijk139/article/details/21543127
回滾的速度快慢透過引數fast_start_parallel_rollback來實現,此引數可以動態調整
引數fast_start_parallel_rollback決定了回滾啟動的並行次數,在繁忙的系統或者IO效能較差的系統,如果出現大量回滾操作,會顯著影響系統系統,可以透過調整此引數來降低影響。官方文件的定義如下:
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 recovery will be stopped and restarted with the new implied degree of parallelism.
回滾過程中,回滾的進度可以透過檢視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 01D40000001F3A36 128
USN:事務對應的undo段
STATE:事務的狀態,可選的值為(BE RECOVERED, RECOVERED, or RECOVERING)
UNDOBLOCKSDONE:事物中已經完成的undo塊
UNDOBLOCKSTOTAL:總的需要recovery的undo資料塊
CPUTIME:已經回滾的時間,單位是秒
RCVSERVERS:回滾的並行程式數
--補充,查詢回滾時間更好的指令碼
SQL> select undoblockstotal "Total",
undoblocksdone "Done",
undoblockstotal - undoblocksdone "ToDo",
decode(cputime,
0,
'unknown',
to_char(sysdate + (((undoblockstotal - undoblocksdone) /
(undoblocksdone / cputime)) / 86400),
'yyyy-mm-dd hh24:mi:ss')) "Estimated time to complete",to_char(sysdate, 'yyyy-mm-dd hh24:mi:ss')
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 2014-03-19 16:59:19 2014-03-19 16:59:19
7,209 7209 0 2014-03-19 16:59:19 2014-03-19 16:59:19
3,428 3428 0 2014-03-19 16:59:19 2014-03-19 16:59:19
34,346 1604 32742 2014-03-19 17:25:31 2014-03-19 16:59:19
下面是一次大量wait for a undo record等待事件的處理過程
1,某使用者使用plsql執行某 insert操作異常,導致表空間不斷增長,於是手工kill該回滾停掉,kill後大量wait for a undo record,大約100多個
2,查詢v$fast_start_transactions檢視,由於fast_start_parallel_rollback引數設定為HIGH,且cpu為32個,因此並行程式為32×4=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 01D40000001F3A36 128
SQL> SHOW parameter ROLLBACK
NAME TYPE VALUE
------------------------------------ -------------------------------- ------------------------------
fast_start_parallel_rollback string HIGH
SQL> show parameter cpu
NAME TYPE VALUE
------------------------------------ -------------------------------- ------------------------------
cpu_count integer 32
3,由於估計還有103/(26922/464160)=30分鐘才能執行完,為了降低對系統效能的影響,對相關表進行了truncate(業務表中的資料不再需要)
SQL> truncate table user1.JT_t1_20140318;
4,truncate時,短時間內出現了row cache lock異常等待,大約幾十秒之後,恢復正常,truncat操作能結束undo回滾操作嗎?
5,其實為了減少undo的影響,可以透過設定fast_start_parallel_rollback,可以線上修改,立即生效
alter system set fast_start_parallel_rollback= FALSE;
回滾的速度快慢透過引數fast_start_parallel_rollback來實現,此引數可以動態調整
引數fast_start_parallel_rollback決定了回滾啟動的並行次數,在繁忙的系統或者IO效能較差的系統,如果出現大量回滾操作,會顯著影響系統系統,可以透過調整此引數來降低影響。官方文件的定義如下:
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 recovery will be stopped and restarted with the new implied degree of parallelism.
回滾過程中,回滾的進度可以透過檢視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 01D40000001F3A36 128
USN:事務對應的undo段
STATE:事務的狀態,可選的值為(BE RECOVERED, RECOVERED, or RECOVERING)
UNDOBLOCKSDONE:事物中已經完成的undo塊
UNDOBLOCKSTOTAL:總的需要recovery的undo資料塊
CPUTIME:已經回滾的時間,單位是秒
RCVSERVERS:回滾的並行程式數
--補充,查詢回滾時間更好的指令碼
SQL> select undoblockstotal "Total",
undoblocksdone "Done",
undoblockstotal - undoblocksdone "ToDo",
decode(cputime,
0,
'unknown',
to_char(sysdate + (((undoblockstotal - undoblocksdone) /
(undoblocksdone / cputime)) / 86400),
'yyyy-mm-dd hh24:mi:ss')) "Estimated time to complete",to_char(sysdate, 'yyyy-mm-dd hh24:mi:ss')
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 2014-03-19 16:59:19 2014-03-19 16:59:19
7,209 7209 0 2014-03-19 16:59:19 2014-03-19 16:59:19
3,428 3428 0 2014-03-19 16:59:19 2014-03-19 16:59:19
34,346 1604 32742 2014-03-19 17:25:31 2014-03-19 16:59:19
下面是一次大量wait for a undo record等待事件的處理過程
1,某使用者使用plsql執行某 insert操作異常,導致表空間不斷增長,於是手工kill該回滾停掉,kill後大量wait for a undo record,大約100多個
2,查詢v$fast_start_transactions檢視,由於fast_start_parallel_rollback引數設定為HIGH,且cpu為32個,因此並行程式為32×4=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 01D40000001F3A36 128
SQL> SHOW parameter ROLLBACK
NAME TYPE VALUE
------------------------------------ -------------------------------- ------------------------------
fast_start_parallel_rollback string HIGH
SQL> show parameter cpu
NAME TYPE VALUE
------------------------------------ -------------------------------- ------------------------------
cpu_count integer 32
3,由於估計還有103/(26922/464160)=30分鐘才能執行完,為了降低對系統效能的影響,對相關表進行了truncate(業務表中的資料不再需要)
SQL> truncate table user1.JT_t1_20140318;
4,truncate時,短時間內出現了row cache lock異常等待,大約幾十秒之後,恢復正常,truncat操作能結束undo回滾操作嗎?
5,其實為了減少undo的影響,可以透過設定fast_start_parallel_rollback,可以線上修改,立即生效
alter system set fast_start_parallel_rollback= FALSE;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31397003/viewspace-2152571/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- solaris10中安裝oracle核心引數的調整Oracle
- oracle回滾溯源Oracle
- Oracle 資料回滾Oracle
- swoole優化核心引數調整優化
- JVM 引數調整對 sortx 的影響JVM
- Oracle11g 自動化建庫及調整相關引數Oracle
- Arduino調整小車速度UI
- PostgreSQL安裝完成後,引數調整SQL
- android4.4調整音量調節速度Android
- solaris記憶體引數調整及管理記憶體
- 達夢資料庫引數調整方法資料庫
- 等待事件wait for a undo record 與 fast_start_parallel_rollback引數事件AIASTParallel
- 利用oracle的日誌挖掘實現回滾Oracle
- docker下的spark叢集,調整引數榨乾硬體DockerSpark
- dg庫日誌應用慢引數調整
- Win10滑鼠移動速度太快如何調整_win10調整滑鼠移動速度的步驟Win10
- Jenkins:引數化構建:分支|模組|回滾|列印日誌Jenkins
- oracle 線上調整redoOracle
- 【Oracle】簡單引數也有講究,JOB_QUEUE_PROCESS引數調研Oracle
- 淺談JVM整體架構與調優引數JVM架構
- 自動編碼器Gridsearch超引數調整KerasKeras
- 【UNDO】Oracle系統回滾段說明Oracle
- 資料庫管理-第143期 Oracle DB 19c需要調整的基本引數V2(20240202)資料庫Oracle
- Linux環境安裝Oracle11g(二)——作業系統引數及服務調整LinuxOracle作業系統
- 關於ORACLE大型事務回滾的幾個點Oracle
- Oracle查詢回滾大事務所需時間Oracle
- Oracle Tuning (Oracle 效能調整)的一些總結(轉)Oracle
- Oracle - 資料庫的記憶體調整Oracle資料庫記憶體
- ORACLE RAC+DG調整redo大小Oracle
- Oracle 核心引數Oracle
- 調優引數
- Oracle Tuning (Oracle 效能調整)的一些總結(轉)2Oracle
- 無刷電調基礎知識以及BLHeli韌體燒錄和引數調整
- ORACLE並行相關的引數Oracle並行
- RecyclerView滾動位置,滾動速度設定View
- Oracle:PDB 引數管理Oracle
- mysql 引數調優MySql
- PostgreSQL技術大講堂 - 第32講:資料庫引數調整SQL資料庫