Databases 8 min read

Why Oracle VKTM Time Drift Happens and How to Resolve It

The article explains Oracle 11g's VKTM background process, how time drift warnings appear in the alert log, analyzes trace files to pinpoint the drift, discusses underlying causes such as OS load, and provides the patch and event‑setting steps needed to fix the bug.

ITPUB
ITPUB
ITPUB
Why Oracle VKTM Time Drift Happens and How to Resolve It

Background: VKTM in Oracle 11g

Oracle introduced the Virtual Keeper of Time Process (VKTM) in 11g to provide a unified, high‑resolution time service for the database instance, replacing direct OS time calls. VKTM publishes wall‑clock time and a higher‑resolution interval timer, reducing kernel interactions and improving performance.

Time Drift Detection

During log inspection, the alert log showed repeated warnings:

Tue Dec 22 21:56:26 2015
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.
Tue Dec 22 23:02:44 2015
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.

These messages indicate that VKTM’s internal timer jumped forward, which can affect resource manager decisions.

Trace File Examination

Relevant trace files were located (e.g., UREPRD_vktm_23138.trc) and contained entries such as:

kstmchkdrift (kstmrmtickcntkeeper:highres): Time jumped forward by (16898372)usec at (1450792586464465) whereas (1000000) is allowed
kstmchkdrift (kstmrmtickcntkeeper:lowres): Time jumped forward by (18000000)usec at (1450792587) whereas (5000000) is allowed

The drift amounts correspond to roughly 18 seconds and 1.1 seconds, exceeding the allowed 1‑second threshold.

Root Causes and Impact

Oracle MOS notes that such drifts usually occur under high system load, virtual memory pressure, or misconfigured NTP. VKTM is scheduled to run every 10 ms; if the OS cannot meet this interval, the timer may jump, potentially leading to resource‑manager mis‑decisions or even hangs.

Fixing the Issue

The problem was identified as Bug 11837095, which appears intermittently in 11.2.0.2‑11.2.0.3 and is fixed in 11.2.0.4. To address it on affected versions, apply patch 11837095 and set the following event to control the behavior:

alter system set event="10795 trace name context forever, level 2" scope=spfile;

After applying the patch and restarting the instance, the VKTM process should maintain the correct 10 ms schedule, eliminating excessive drifts.

Conclusion

VKTM is a critical time‑keeping component introduced in Oracle 11g. When alert‑log warnings about time drift appear, examine the VKTM trace files, verify system load, and apply the official MOS‑recommended patch and event setting. Early resolution prevents larger stability issues.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

OracleAlert LogTime DriftVKTM
ITPUB
Written by

ITPUB

Official ITPUB account sharing technical insights, community news, and exciting events.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.