12C開始oracle實現了SCALABLE LGWR多程式並行寫redo log
在oracle 12.1版本之前,oracle日誌寫程式LGWR為單程式,oracle 12.1開始實現了SCALABLE LGWR多程式,採用多個LGWR協同對redo log日誌進行並行寫入,這是Oracle資料庫內部最重要的改進,解決了最後的併發瓶頸點
SCALABLE LGWR主要受到隱藏引數_use_single_log_writer和_max_outstanding_log_writes的控制
_use_single_log_writer引數主要有三個可選值 true,false,adaptive,預設值為adaptive
false,adaptive:如果CPU個數大於一個則會有多個lg0n程式
true:不生成多個lg0n程式,如同12.1之前那樣僅有單個LGWR
_max_outstanding_log_writes引數預設值為2
[oracle@12C ~]$ ps -ef |grep ora_lg |grep -v grep oracle 6305 1 0 14:53 ? 00:00:00 ora_lgwr_OCP oracle 6311 1 0 14:53 ? 00:00:00 ora_lg00_OCP oracle 6315 1 0 14:53 ? 00:00:00 ora_lg01_OCP SQL> select VERSION from v$instance; VERSION ----------------- 12.1.0.2.0 SQL>select a.ksppinm name, b.ksppstvl value, a.ksppdesc description from x$ksppi a, x$ksppcv b where a.indx = b.indx and a.ksppinm in ('_max_outstanding_log_writes','_use_single_log_writer'); NAME VALUE DESCRIPTION ------------------------------ ---------- -------------------------------------------------- _use_single_log_writer ADAPTIVE Use a single process for redo log writing _max_outstanding_log_writes 2 Maximum number of outstanding redo log writes
修改_max_outstanding_log_writes=3
SQL> alter system set "_max_outstanding_log_writes"=3 scope=spfile; System altered. SQL> startup force SQL>select a.ksppinm name, b.ksppstvl value, a.ksppdesc description from x$ksppi a, x$ksppcv b where a.indx = b.indx and a.ksppinm in ('_max_outstanding_log_writes','_use_single_log_writer'); NAME VALUE DESCRIPTION ------------------------------ ---------- -------------------------------------------------- _use_single_log_writer ADAPTIVE Use a single process for redo log writing _max_outstanding_log_writes 3 Maximum number of outstanding redo log writes [oracle@12C ~]$ ps -ef|grep lg|grep -v grep oracle 8589 1 0 15:13 ? 00:00:00 ora_lgwr_OCP oracle 8593 1 0 15:13 ? 00:00:00 ora_lg00_OCP oracle 8597 1 0 15:13 ? 00:00:00 ora_lg01_OCP oracle 8601 1 0 15:13 ? 00:00:00 ora_lg02_OCP
修改_use_single_log_writer='true'
SQL> alter system set "_use_single_log_writer"='true' scope=spfile; System altered. SQL> startup force SQL>select a.ksppinm name, b.ksppstvl value, a.ksppdesc description from x$ksppi a, x$ksppcv b where a.indx = b.indx and a.ksppinm in ('_max_outstanding_log_writes','_use_single_log_writer'); NAME VALUE DESCRIPTION ------------------------------ ---------- -------------------------------------------------- _use_single_log_writer true Use a single process for redo log writing _max_outstanding_log_writes 1 Maximum number of outstanding redo log writes
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30126024/viewspace-2742435/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- LGWR writes redo log (117)
- Oracle Redo 並行機制Oracle Redo並行
- Oracle LGWR程式Oracle
- Redo Log之一:理解Oracle redo logOracle Redo
- oracle redo log operationOracle Redo
- Oracle Standby Redo Log實驗兩則Oracle
- 走向並行系列之-使用ForkManager編寫多程式程式並行
- Oracle redo log重組Oracle Redo
- Oracle Dump Redo Log FileOracle
- 現在,開始用嘴寫程式碼!
- LGWR,Log Switches, and Checkpoints
- 從零開始寫 Docker(十)---實現 mydocker logs 檢視容器日誌Docker
- Oracle Dataguard Standby Redo Log的兩個實驗Oracle
- Oracle redo解析之-1、oracle redo log結構計算Oracle Redo
- 從 0 開始實現程式語言(一):手寫 jsonParserJSON
- 修改oracle redo log的大小Oracle Redo
- Oracle redo log 常見操作Oracle Redo
- PHP實現多程式並行操作,可做守護程式(轉,備用)PHP並行
- oracle redo internal 之 dump logfileOracle Redo
- oracle redo internal 之 dump logfileOracle
- oracle檔案管理之 redo logOracle
- 使用LOGMNR工具分析Oracle Redo Log和Archive Log教程Oracle RedoHive
- 在no_ui中使用多程式實現多賬戶並行執行,並分配各自獨立的工作環境和策略UI並行
- 一行 Python 程式碼實現並行Python並行
- Oracle調整redo log日誌大小Oracle
- Java多執行緒並行處理任務的實現Java執行緒並行
- 從零開始寫 Docker(八)---實現 mydocker run -d 支援後臺執行容器Docker
- 從零開始寫 Docker(九)---實現 mydocker ps 檢視執行中的容器Docker
- Oracle DG 出現 RFS[6]: No standby redo logfiles created for thread 1Oraclethread
- slave庫寫redo、binlog不實時丟資料的場景
- Log Writer Process (LGWR) (115)
- 從零開始寫 Docker(五)---基於 overlayfs 實現寫操作隔離Docker
- undo log和redo log
- 從零開始寫 Docker(十二)---實現 mydocker stop 停止容器Docker
- ORACLE 11gr2 ASM redo log 增加OracleASM
- zt_Oracle Dump Redo Log File 說明Oracle
- 【操作】調整Online Redo Logs大小(Resizing Oracle Online Redo Logs)Oracle
- Oracle 12c logminer測試Oracle