Warning: VKTM detected a time drift.


復制代碼
 1 Warning: VKTM detected a time drift.
 2 Time drifts can result in an unexpected behavior such as time-outs. Please check trace file for more details.
 3 Tue Dec 03 16:21:35 2019
 4 Warning: VKTM detected a time drift.
 5 Time drifts can result in an unexpected behavior such as time-outs. Please check trace file for more details.
 6 Tue Dec 03 16:38:23 2019
 7 Adjusting the default value of parameter parallel_max_servers
 8 from 640 to 320 due to the value of parameter processes (350)
 9 Starting ORACLE instance (normal)
10 Tue Dec 03 21:09:32 2019
11 Warning: VKTM detected a time drift.
12 Time drifts can result in an unexpected behavior such as time-outs. Please check trace file for more details.
13 Tue Dec 03 22:00:00 2019
14 Setting Resource Manager plan SCHEDULER[0x32DA]:DEFAULT_MAINTENANCE_PLAN via scheduler window
15 Setting Resource Manager plan DEFAULT_MAINTENANCE_PLAN via parameter
16 Tue Dec 03 22:00:00 2019
17 Starting background process VKRM
18 Tue Dec 03 22:00:00 2019
19 VKRM started with pid=78, OS id=28922 
20 Tue Dec 03 22:00:02 2019
21 Begin automatic SQL Tuning Advisor run for special tuning task "SYS_AUTO_SQL_TUNING_TASK"
22 Tue Dec 03 22:20:55 2019
23 End automatic SQL Tuning Advisor run for special tuning task "SYS_AUTO_SQL_TUNING_TASK"
24 Tue Dec 03 22:46:17 2019
25 Warning: VKTM detected a time drift.
26 Time drifts can result in an unexpected behavior such as time-outs. Please check trace file for more details.
27 Wed Dec 04 00:00:29 2019
28 Thread 1 advanced to log sequence 5843 (LGWR switch)
復制代碼


在Oracle Database 11g中,VKTM是一個新增的后台進程。這個進程的含義是:

VKTM (virtual keeper of time) is responsible for providing a wall-clock time (updated every second) and
reference-time counter (updated every 20 ms and available only when running at elevated priority).

也就是說,這個進程用於提供一個數據庫的時鍾,每秒更新;或者作為參考時間計數器,這種方式每20毫秒更新一次,僅在高優先級時可用。

在系統時間出現異常或變化時,VKTM進程還會檢測這些變化,提醒用戶,尤其是在RAC環境中,時間的偏移和變化極有可能導致系統故障。以下是告警日志中的警告信息:

Warning: VKTM detected a time drift.
Time drifts can result in an unexpected behavior such as time-outs. Please check trace file for more details.

通過VKTM進程,數據庫可以降低和操作系統的交互,Kamus的解釋是:

在11g之前所有的Oracle數據庫后台或者前台進程如果需要獲得當前時間信息,就需要調用操作系統的gettimeofday()函數或者說是相類似的函數。
而VKTM進程就是專門用來獲得時間信息然后將信息存放在SGA中供其它進程使用,這樣其它進程當需要時間信息的時候,只要到SGA的某個內存位置去獲得就好,
而不用頻繁調用gettimeofday()函數。毫無疑問,這樣效率會更高。

在RAC測試中,Oracle 11.1.0.6版本LMSx進程獲取時間信息時,可以從VKTM進程中獲益大概70%的速度提升,而11.1.0.7將會更高。

同時,因為gettimeofday()函數也引發了很多bug,所以無論是RAC還是NORAC庫,都將從VKTM進程中獲益。

參考
https://www.eygle.com/archives/2012/06/oracle_11g_vktm.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM