For random input lag: Hardware Cache Prefetcher? (BIOS)

Everything about latency. Tips, testing methods, mouse lag, display lag, game engine lag, network lag, whole input lag chain, VSYNC OFF vs VSYNC ON, and more! Input Lag Articles on Blur Busters.
Jonnyc55
Posts: 10
Joined: 15 Jan 2024, 08:09

Re: For random input lag: Hardware Cache Prefetcher? (BIOS)

Post by Jonnyc55 » 13 Mar 2024, 14:40

RealNC wrote:
19 Feb 2024, 09:43
Jonnyc55 wrote:
18 Feb 2024, 17:13
With the vertices already loaded, does the fact a user moves his camera around, not push anything new to the CPU then? I'm not having all viewing angles of all the vertices are pre-calculated.
Input has already been read. Games don't read input in the middle of rendering a frame and then cancel the frame rendering because there's new input. If that was the case, simply moving the mouse quickly would results in your FPS dramatically decreasing, because the mouse movement would result in constantly aborting the rendering of frames. Once the input is read, the next frame is prepared and then rendered. Nothing is going to change in the middle of rendering a frame. Every code path that needs to be taken and all data that is to be operated on is decided upon right after reading input.

Also keep in mind that games don't read user input constantly. They only poll the state of your input devices once per frame. Once input is polled, the game doesn't care anymore about input until the next frame. And that is a very long, long time for a CPU. The timescale on the other hand that the prefetcher operates in, is tiny.
Even if the CPU was quickly lining up the rest of summoned calculations in nanoseconds into cache, it would quickly get swamped with new needs by the new camera angles.
Nothing changes while rendering a frame. Once the frame is rendered, the state of the input devices is read again, and the next frame is getting prepared and rendered based on that input state. During the frame prepare+render step, the game needs to operate on data, and that data is being loaded by the prefetcher into the cache in parallel while the CPU operates on data already in the cache.

Also, the BIOS feature you're talking about is not about disabling prefetch entirely. It's an additional setting that mostly tweaks the prefetcher to aggressively load more things into cache. You cannot disable prefetch entirely. It's a vital optimization of any CPU for many years now and performance would be crippled without it.
Depending on the scene in the game, I assume puts a different load on prefetching? My FPS can tank, if I'm looking into a valley overlooking lots of things verses staring at a wall.

Rendering these different assets is doing something strong to the GPU for a start. Enough to cripple it, or have it flying off like the Golden Snitch from quidditch in Harry Potter.

And in that regard, I can't imagine how the hardware prefetcher can prepare itself for you to suddenly look over the valley? I get that in the world of nanoseconds, it has probably rapidly streamlined this scene, with the millisecond world. So I guess... does the hardware prefetcher sometimes have to rapidly ditch wrongly assumed assets?

Thanks.

Post Reply