alert日志中出现PrivateStrandFlushNotComplete的处理方法
还是南京那个客户的库,alert.log日志还报了如下的错误: Fri Oct 17 19:59:51 2014Thread 1 cannot allocate new log, sequence 4722Private strand flush not complete Current log# 1 seq# 4721 mem# 0: /oradata/sgomp5/redo01.logThread 1 advanced to l
还是南京那个客户的库,alert.log日志还报了如下的错误:Fri Oct 17 19:59:51 2014 Thread 1 cannot allocate new log, sequence 4722 Private strand flush not complete Current log# 1 seq# 4721 mem# 0: /oradata/sgomp5/redo01.log Thread 1 advanced to log sequence 4722 (LGWR switch) Current log# 2 seq# 4722 mem# 0: /oradata/sgomp5/redo02.log
在MOS社区中找到了一篇关于这个问题的文章:
Historically, Every user session wrote the changes to redo log buffer and changes from redo log buffer are flushed to redo logs on disk by lgwr. As number of users increased, the race and the need to get latch for redo allocation and redo copy on the public redo buffer increased. So, starting from 10g, Oracle came up with concept ofprivate redo (x$kcrfstrand) and in-memory undo (x$ktifp). Every session has private redo where session writes to and then a (small) batch of changes is written to public redo and finally from public redo log buffer to redo log files on disk. This mechanismreduces the gets/sleeps on redo copy and redo allocation latches on the public redo buffer and hence makes the architecture more scalable.
It is also worth noting that oracle falls back to old redo mechanism in case transaction is too big (with lots of changes) and if changes done by that transaction can't fit into private redo buffers.
当数据库切换日志时,所有private strand都必须刷新到当前日志,然后才能继续。此信息表示我们在尝试切换时,还没有完全将所有 redo信息写入到日志中。这有点类似于“checkpoint not complete”,不同的是,它仅涉及到正在被写入日志的redo。在写入所有redo前,无法切换日志。
Private Strands是10gR2才有的,它用于处理redo的latch(redo allocation latch)。是一种允许进程利用多个allocation latch更高效地将redo写入redo buffer cache的机制,它与9i中出现的log_parallelism参数相关。提出Strand的概念是为了确保实例的redo生成率达到最佳,并能确保在出现某种redo争用时,可以动态调整strand的数量进行补偿。初始分配的strand数量取决于CPU的数量,最少两个strand,其中一个strand用于active的redo生成。
对于大型的oltp系统,redo生成量非常大,因此当前台进程遇到redo争用时,这些strand会被激活。shared strand总是与多个private strand共存。Oracle 10g的redo(和undo)机制有一些重大变化,目的是为了减少争用。此机制不再实时记录redo,而是先记录在一个private area,并在commit时flush到redo log buffer中去。在这种新机制引入后,一旦用户进程申请到private strand,redo不再保存到pga中,因此不再需要redo copy latch这个过程。
如果新事务申请不到private strand的redo allocation latch,则会继续遵循旧的redo buffer机制,申请写入shared strand中。对于这个新的机制,在进行redo被写出到logfile时,LGWR需要将shared strand与private strand的内容写出。当redo flush发生时,所有的public strands的redo allocation latch需要被获取,所有的public strands的redo copy latch需要被检查,所有包含活动事务的private strands需要被持有。其实,对于这个现象也可以忽略,除非“cannot allocate new log”信息和“advanced to log sequence”信息之间有明显的时间差。
如果想要在alert.log中避免出现Private strand flush not complete事件,那么可以通过增加参数db_writer_processes的值来实现,因为DBWn会触发LGWR将redo写入到logfile,如果有多个DBWn进程一起写,可以加速redo buffer cache写入redo logfile。
可以使用以下命令修改: SQL> alter system set db_writer_processes=4 scope=spfile; --该参数时静态参数,必需重启数据库后生效
注意,DBWR进程数应该与逻辑CPU数相当。另外地,当oracle发现一个DB_WRITER_PROCESS不能完成工作时,也会自动增加其数量,前提是已经在初始化参数中设定过最大允许的值。
关于DB_WRITER_PROCESSES和DBWR_IO_SLAVES参数的一些说明:
DB_WRITER_PROCESSES replaces the Oracle7 parameter DB_WRITERS and specifies the initial number of database writer processes for an instance. If you use DBWR_IO_SLAVES, only one database writer process will be used, regardless of the setting for DB_WRITER_PROCESSES
DB_WRITER_PROCESSES参数就是在Oracle 7中的DB_WRITERS参数,用来指定数据库实例的DBWR进程个数,当系统中还配置了DBWR_IO_SLAVES参数时(默认为0),则只能利用到一个DBWn进程,而忽略其他的。
DBWR_IO_SLAVES If it is not practical to use multiple DBWR processes, then Oracle provides a facility whereby the I/O load can be distributed over multiple slave processes. The DBWR process is the only process that scans the buffer cache LRU list for blocks to be written out. However, the I/O for those blocks is performed by the I/O slaves. The number of I/O slaves is determined by the parameter DBWR_IO_SLAVES.
当使用单一DBWR进程时,Oralce提供了使用多个I/O slave进程来完成模拟异步IO,去完成全本应该由DBWR做的事情(写LRU上的数据块到磁盘文件),这个slave的数量是通过DBWR_IO_SLAVES参数来指定的
DBWR_IO_SLAVES is intended for scenarios where you cannot use multiple DB_WRITER_PROCESSES (for example, where you have a single CPU). I/O slaves are also useful when asynchronous I/O is not available, because the multiple I/O slaves simulate nonblocking, asynchronous requests by freeing DBWR to continue identifying blocks in the cache to be written. Asynchronous I/O at the operating system level, if you have it, is generally preferred.
DBWR_IO_SLAVES参数通常被用在单CPU的场景中,因为单CPU即使设置了多DBWR进程数也是没有效果的。无论操作系统是否支持异步IO,使用多个I/O slaves都是有效的,可以分担DBWR的任务。如果使用了异步IO,那就更加推荐设置了
DBWR I/O slaves are allocated immediately following database open when the first I/O request is made. The DBWR continues to perform all of the DBWR-related work, apart from performing I/O. I/O slaves simply perform the I/O on behalf of DBWR. The writing of the batch is parallelized between the I/O slaves.
DBWR的I/O slaves当数据库open时发生第一次I/O请求时被分配,DBWR进程继续完成与自身相关任务,而分离出部分I/O处理任务给I/O slaves,各个I/O slaves之间的I/O处理都是并行的
Choosing Between Multiple DBWR Processes and I/O Slaves Configuring multiple DBWR processes benefits performance when a single DBWR process is unable to keep up with the required workload. However, before configuring multiple DBWR processes, check whether asynchronous I/O is available and configured on the system. If the system supports asynchronous I/O but it is not currently used, then enable asynchronous I/O to see if this alleviates the problem. If the system does not support asynchronous I/O, or if asynchronous I/O is already configured and there is still a DBWR bottleneck, then configure multiple DBWR processes.
关于如何选择多个DBWR进程和I/O slaves进程 当单一的DBWR进程无法胜任大量的写工作负载,配置多个DBWR进程是有效的。但是在配置多个DBWR进程前,需要先检查OS上是否支持异步I/O,如果支持但未开启,那么先开启;如果系统不支持或已经配置了异步IO后,仍然有DBWR瓶颈,那么就可以配置多个DBWR进程
Using multiple DBWRs parallelizes the gathering and writing of buffers. Therefore, multiple DBWn processes should deliver more throughput than one DBWR process with the same number of I/O slaves. For this reason, the use of I/O slaves has been deprecated in favor of multiple DBWR processes. I/O slaves should only be used if multiple DBWR processes cannot be configured.
开启多个DBWR进程就意味着可以并行写更多的脏缓存(dirty buffer)到数据文件,而多个DBWR的吞吐量,也要比1个DBWR+相当数量的I/O slaves的要高,因此,当开启了多个DBWR进程时,就不应该再配置DBWR_IO_SLAVES(如果原来是非零的话),可以把这个参数设置为0
总结:
DBWR_IO_SLAVES主要用于模拟异步环境,在不支持异步操作的OS上,可以提高IO的读写速度。
多个DBWR进程可以并行地从data buffer中获取dirty block并且并行地写入磁盘。但是,在单DBWR+多个I/O slaves的场景下,只能是一个DBWR负责从data buffer中获取,而多个I/O slaves并行写入。如果系统支持AIO(disk_async_io=true),一般不用设置多dbwr
或io slaves。
如果在有多个cpu的情况下建议使用DB_WRITER_PROCESSES,因为这样的情况下不用去模拟异步模式,但要注意进程数量不能大于cpu数量。而在只有一个cpu的情况下建议使用DBWR_IO_SLAVES来模拟异步模式,以便提高数据库性能。

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

記事本++7.3.1
好用且免費的程式碼編輯器

SublimeText3漢化版
中文版,非常好用

禪工作室 13.0.1
強大的PHP整合開發環境

Dreamweaver CS6
視覺化網頁開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

win10的日誌可以幫助使用者詳細的了解系統使用情況,很多的使用者在尋找自己的管理日誌的時候,一定都遇到過日誌6013吧,那麼這個程式碼的意思是什麼呢,下面就來介紹一下。 win10日誌6013是什麼:1.這個是正常的日誌。這個日誌的資訊並不是表示你的電腦重啟了,而是說明自從上次啟動以來,系統運行了多長的時間了。日誌會每天12點整出現一次。如何查看系統運作多久了,可以在cmd中輸入systeminfo。其中有一行就是。

作用是:給工程師們回饋使用資訊與記錄方便分析問題(開發時使用的);由於使用者本身不是經常產生上傳日誌,所以對使用者無用。日誌記錄緩衝區是小型的、用於短期儲存將寫入到磁碟上的重做日誌的變更向量的臨時區域。日誌緩衝區對磁碟的一次寫入是來自多個交易的一批變更向量。即使如此,日誌緩衝區中的變更向量也是接近即時寫入磁碟,當會話發出COMMIT語句時,會即時執行日誌緩衝區寫入操作。

win10的日誌可以幫助用戶詳細的了解系統使用情況,很多的用戶在尋找自己的管理日誌的時候,肯定都看到過很多的錯誤日誌吧,那麼該怎麼解決他們呢,下面就一起來看看吧。 win10日誌事件7034怎麼解決:1、點擊“開始”打開“控制面板”2、找到“管理工具”3、點擊“服務”4、找到HDZBCommServiceForV2.0右鍵“停止服務”,並改為“手動啟動」

隨著網路和Web應用的快速發展,日誌管理也越來越重要。在開發Web應用時,如何尋找和定位問題是一個非常關鍵的問題。日誌系統是一種非常有效的工具,可以幫助我們實現這些任務。 ThinkPHP6提供了一個強大的日誌系統,可以幫助應用程式開發人員更好地管理和追蹤應用程式中發生的事件。本文將介紹如何在ThinkPHP6中使用日誌系統,以及如何利用日誌系統

在Linux系統中,可以使用下列指令來查看日誌檔案的內容:tail指令:tail指令用來顯示日誌檔案的末尾內容。它是查看最新日誌資訊的常用命令。 tail[選項][檔案名稱]常用的選項包括:-n:指定要顯示的行數,預設為10行。 -f:即時監視文件內容,並在文件更新時自動顯示新的內容。範例:tail-n20logfile.txt#顯示logfile.txt檔案的最後20行內容tail-flogfile.txt#即時監視logfile.txt檔案的更新內容head指令:head指令用於顯示記錄檔的開頭

iPhone可讓您在「健康」App中添加藥物,以便追蹤和管理您每天服用的藥物、維生素和補充劑。然後,您可以在設備上收到通知時記錄已服用或跳過的藥物。記錄用藥後,您可以查看您服用或跳過用藥的頻率,以幫助您追蹤自己的健康狀況。在這篇文章中,我們將指導您在iPhone上的健康應用程式中查看所選藥物的日誌歷史記錄。如何在「健康」App中查看用藥日誌歷史記錄簡短指南:前往「健康」App>瀏覽「>用藥」>用藥「>選擇一種用藥>」選項「&a

win10的日誌有著很多豐富的內容,很多的用戶在尋找自己的管理日誌的時候,肯定都見過事件ID455顯示錯誤,那麼它到底是什麼意思呢,下面就一起來看看。 win10日誌中事件ID455是什麼:1、ID455是訊息儲存開啟日誌檔案時<檔案>發生的錯誤<錯誤>
