한국어English日本語简体中文繁體中文DeutschไทยTiếng ViệtРусскийPortuguês (Brasil)EspañolBahasa Indonesia

Game Lag White Paper › L2 Client OS and device

Background processes taking up CPU Background CPU contention

Cause ID co-background · Primary owner External (External) · Also Game team (Client development)

Open the interactive card with figures and simulations →

When an antivirus scan, Windows Update, streaming software, or a browser video takes over CPU cores, the game thread has to wait for CPU time.

Why Other programs hold CPU cores for a long time → Effect The game thread waits for CPU time → On screen Frames come late, and received packets are processed late too

Symptoms
Stutter, Fast-forward
Factors
Stall
Who’s affected
Just me
When
Randomly, At regular intervals
Owner
Primary owner External (External) · Also Game team (Client development)
Game team action items
Adjust game thread priority; record whole-PC CPU usage in the logs taken when stutter happens, to tell whether another program is to blame.
External action items
Tell players to turn on Windows Game Mode and to close unneeded programs while playing (antivirus scans, Windows Update, streaming software, browser videos).
Ballpark numbers
Windows usually hands out a core for a few ms to tens of ms at a time. Getting passed over by the scheduler just once is enough to lose a frame.
On the graph
Random spikes · Whole-PC CPU usage, frame time
Where to look
Record the CPU column in Task Manager’s Processes tab and Processor Information(_Total)\% Processor Time in Performance Monitor together with PresentMon frame time. If antivirus is suspected, record with New-MpPerformanceRecording and use Get-MpPerformanceReport to find the files and processes with the longest scan times
Confirmed if
Another program’s CPU use (antivirus scan, update, streaming software) spikes at the stutter times, or files in the game folder rank near the top for scan time. Closing that program or adding an exclusion makes it go away
Ruled out if
The whole screen hitches and audio crackles even though CPU usage is low: “NIC power saving and driver issues” (DPC latency)
Check with
The player’s own environment
Learn more
Windows gives the program in the front window (foreground) a little extra priority, but when there’s more work than there are cores, the game waits too. Antivirus software gets in the way through “real-time protection” more often than through CPU use. It scans every time the game opens a file, so the freezes while assets load get longer.

Sources

  1. Multitasking Microsoft
    Windows gives each thread a time slice and moves on to the next thread when it’s used up; a time slice is about 20 ms (varies by OS and CPU)
  2. Priority Boosts Microsoft
    The process in the front window (foreground) gets its priority raised to at least that of background processes
  3. About regular quick and full scans with Microsoft Defender Antivirus Microsoft
    Real-time protection scans every time a file is opened or closed and every time a folder is opened
  4. Network-Related Performance Counters Microsoft
    Processor Information: % Processor Time counter
  5. Performance analyzer for Microsoft Defender Antivirus Microsoft
    Record with New-MpPerformanceRecording and use Get-MpPerformanceReport to see the top files, paths, and processes that affected scan time
  6. PresentMon Capture Application (README-CaptureApplication.md) Intel
    Records per-frame time as FrameTime (CPU time between frames)

See also

Same layer: L2 Client OS and device

Same symptom (Stutter), other layers

View the interactive card with figures and simulations