Ogapo
Ogapo

Reputation: 541

What sort of things can cause a whole system to appear to hang for 100s-1000s of milliseconds?

I am working on a Windows game and while rendering, some computers will experience intermittent pauses ("hitches" for lack of a better term). When profiled they appear in seemingly random places in the code. Eventually I noticed that it wasn't just my process that was affected, but (seemingly) every process on the system. All of the threads in my application hitch at once. The CPU utilization drops during these hitches and it appears as if most processes make no progress.

This leads me to believe this may be an Operating System or Driver issue, but it only occurs while playing the game (and only on some systems). What sort of operations might the operating system be doing that would require the kernel to pause all user threads and block. Some kind of I/O? At first I thought of paging but my impression is that would only affect a single process, no?

Some systems in use: Windows, DirectX (3d), nVidia cards (unknown if replicates on ATI), using overlapped io for streaming

Upvotes: 1

Views: 78

Answers (2)

Zoner
Zoner

Reputation: 626

Heavy use of memory mapped IO. This of course includes the system pagefile, but can also include user applications that use mmio heavily (gcc for one)

Upvotes: 1

Dave
Dave

Reputation: 3448

If you have a lot of graphics in use, it may be paging graphics memory into the swap file.

Or perhaps the stream is getting buffered on disk?

It's worth seeing if the hitches coincide with the PC's disk activity LED.

Upvotes: 1

Related Questions