What is max pre-rendered frames?

pong lenis

Member
Apr 23, 2013
119
0
0
I'm dying to know what this is, it's in the nvidia control panel. I want to know because when I set this value to "1", it fixes stuttering issues in half the games I play. And there is no explanation to this anywhere on the net as to why it does this, just random people posting their experience on forums with setting it to 1. Most of the so called "professionals" on the net tell you to set it at maximum value to reduce stuttering, but this actually has the opposite effect (they just read its label in the Nvidia control panel and jump to a premature conclusion based on zero experience).
And to actually find this fix would require that you enter the exact words "set max pre-rendered frames to 1" in google search, cause searching otherwise you will only get the dipsticks who tell you to set it at maximum.
It might help to mention that recording a video with fraps or any other recording program while in-game has the exact same effect as setting this value to 1, this was discovered by accident by people who wanted to upload a video on the internet showing how their game stuttered, and whenever they started recording the stuttering disappeared.
 

lehtv

Elite Member
Dec 8, 2010
11,897
74
91
http://www.tweakguides.com/NVFORCE_6.html
Maximum Pre-Rendered Frames: If available, this option - previously known as 'Max Frames to Render Ahead' - controls the number of frames the CPU prepares in advanced of being rendered by the GPU. The default value is 3 - higher values tend to result in smoother but more laggy gameplay, while lower values can help reduce mouse and keyboard lag. However extremely low values such as 0 may hurt performance, so I recommend this option be kept at its default of 3 globally, and only adjusted downwards in specific game profiles. Remember, in most cases mouse lag is due to low framerates, so adjusting this option is not an automatic cure to lag issues, nor should it be the first thing you try. Finally, it only works in DirectX games, not OpenGL games.
 

thujone

Golden Member
Jun 15, 2003
1,158
0
71
berating the first person to respond will surely lead to someone giving you exactly the information you want. i'm sure of it.
 

pong lenis

Member
Apr 23, 2013
119
0
0
berating the first person to respond will surely lead to someone giving you exactly the information you want. i'm sure of it.

When I get an actual attempt at an answer, meaning not some guy who doesn't read the question and copies and pastes the first link he gets in google and some douche who wants to teach me how to interact with people, then I'll be very grateful.
 

bystander36

Diamond Member
Apr 1, 2013
5,154
132
106
This feature sounds a lot like triple buffering but with more options. 2 is likely the same as triple buffering. As it gives you two buffers in addition to the display buffer, which is what triple buffering is. Though triple buffering is an OpenGL option, this is DirectX.
 

Pottuvoi

Senior member
Apr 16, 2012
416
2
81
Unlike triple buffering this is not for finalized frames, but for a displaylists that CPU prepares for the GPU.
This is also not limited to a couple of frames.

Basically if you have lagging mouse with high vsynced framerates, this is the settings that you need to lower.
 

BFG10K

Lifer
Aug 14, 2000
22,709
3,000
126
Thank you captain obvious for referring me to one of the 'professional' dipsticks I mentioned, and non other than the famous idiot's guide to pointless tweaking.
In this case the "professional dipstick" is correct.
 

pong lenis

Member
Apr 23, 2013
119
0
0
Unlike triple buffering this is not for finalized frames, but for a displaylists that CPU prepares for the GPU.
This is also not limited to a couple of frames.

Basically if you have lagging mouse with high vsynced framerates, this is the settings that you need to lower.

That's what's written on the Nvidia Control Panel, what I'm asking is why setting it to 1 results in smoother gameplay, i.e. less frameskipping.
 

pong lenis

Member
Apr 23, 2013
119
0
0
In this case the "professional dipstick" is correct.

Please, for the love of God, would you just read the question? Is it incomprehensable? Isn't it written in plain english and decent grammar?
Here it is again, and you probably won't read it again:
Most of the so called "professionals" on the net tell you to set it at maximum value to reduce stuttering, but this actually has the opposite effect (they just read its label in the Nvidia control panel and jump to a premature conclusion based on zero experience).
And to actually find this fix would require that you enter the exact words "set max pre-rendered frames to 1" in google search, cause searching otherwise you will only get the dipsticks who tell you to set it at maximum.
What the 'professional dipstick' at the tweak guide is saying is that you should set it at 3 to have smoother gameplay, which is incorrect and harmful to anyone who reads it and does it.
 
Last edited:

PrincessFrosty

Platinum Member
Feb 13, 2008
2,300
68
91
www.frostyhacks.blogspot.com
Like most graphical options max frames to render ahead is a trade off between various different performance characteristics. Basically it's the number of frames the CPU can prepare ahead of the one the GPU is drawing.

Generally speaking lower values keep frame latency down so that your output (video, sound) has as little latency as possible from the input (mouse, keyboard, etc), but if the buffer runs out then your GPU will have to wait for your CPU to finish calculating the game state for the next frame.

Conversely higher values help buffer future frames so that if the engine tickrate (the rate at which game logic is re-calculated) becomes unusually low for a period of time you have a buffer of frames to use to keep performance smooth.

When you say a value of 1 removes stuttering, with respect to what other values, a value of zero or some other value higher than 1?

It's worth noting that this value only applies to DirectX games and only when Vsync is off otherwise the number of buffers is fixed (double, triple)
 

pong lenis

Member
Apr 23, 2013
119
0
0
Like most graphical options max frames to render ahead is a trade off between various different performance characteristics. Basically it's the number of frames the CPU can prepare ahead of the one the GPU is drawing.

Generally speaking lower values keep frame latency down so that your output (video, sound) has as little latency as possible from the input (mouse, keyboard, etc), but if the buffer runs out then your GPU will have to wait for your CPU to finish calculating the game state for the next frame.

Conversely higher values help buffer future frames so that if the engine tickrate (the rate at which game logic is re-calculated) becomes unusually low for a period of time you have a buffer of frames to use to keep performance smooth.

When you say a value of 1 removes stuttering, with respect to what other values, a value of zero or some other value higher than 1?

It's worth noting that this value only applies to DirectX games and only when Vsync is off otherwise the number of buffers is fixed (double, triple)
Well the lowest value is 1 not 0, I think perhaps it's AMD cards that have the 0 value available.

In the Nvidia control panel there are four values, 1,2,3, and 4. What I mean is that setting it to 1 removes stuttering, while setting it to any of the other values creates stuttering.

I'm not sure about it applying only to DirectX games, but I'm 100% that this value is of significance when Vsync is ON, as I always have Vsync enabled globally.
I would upload a video to show the stuttering, but it's impossible because as I mentioned before: recording a video has the same effect as setting max pre-rendered frames to 1 so you wouldn't see any stuttering.

Btw, FINALLY there is someone who read my question! Thank you.
 
Last edited:

BFG10K

Lifer
Aug 14, 2000
22,709
3,000
126
Please, for the love of God, would you just read the question? Is it incomprehensable? Isn't it written in plain english and decent grammar?
Again, the tweakguides description is correct. Which part of this sentence are you having trouble understanding?

What the 'professional dipstick' at the tweak guide is saying is that you should set it at 3 to have smoother gameplay, which is incorrect and harmful to anyone who reads it and does it.
Uh, no. Higher values do indeed cause smoother gameplay at the cost of input latency. Too low values can cause reduced performance, and even random stuttering in some cases.

Listen, it's great that you're discovering this wonderful setting for the first time, but I've actually tested it in about two or three dozen different games over the years, so I'm quite qualified to comment.

If you're getting stuttering at default values I'd be checking more obvious places first, such as any overclocks you might be running.
 

BrightCandle

Diamond Member
Mar 15, 2007
4,762
0
76
Max Prerendered frames is the size of the context queue, or in other words a buffer of the command list. What happens in DX is that all the API calls get put into a list and are processed initially in the user space part of the graphics driver. Once that is done the processed list is passed through the windows kernel space into the kernel space driver that then executes the commands on the graphics card, but only once the GPU is ready. It has nothing to do with double buffering or vsync, its just another type of buffer that is before the graphics card.

Given that a longer buffer should make input into the GPU smoother, by always having a frame or two waiting to be processed the GPU can always be fully utilised and the game can continue processing given some space in the buffer list. Thus both can work at their peak and any hiccups on either side can be absorbed without impacting the other and loosing frame rate.

The cost of having a large buffer however is that it takes longer for that frame of data to make it onto screen, an extra 16ms per entry in the buffer at the worst case.

Given that and the typical impact why might it be showing the opposite of expected? Well because you play with vsync on. The problem with vsync is that unless you are on exactly 30fps or 60fps everything in between has a stuttering pattern using some combination of 33ms and 16ms frames. 45fps is about the worst of it where 16 and 33 show alternatively and I personally find that is much worse than 30fps consistently. So why might reducing the buffer fix a problem? Well it might be changing the performance of the game (Arma 2 for example looses 10 fps for me on 1 verses 3) such that you move away from a bad pattern that you are noticing.

But here is the thing. Fraps frame times can objectively measure this problem because it measures precisely this cause of problem. So take some frame time captures of default and 1 and look at the difference and it will probably become apparent what is going on. Whatever you find out post the graphs back here, always keen on seeing stutter traces.
 

PrincessFrosty

Platinum Member
Feb 13, 2008
2,300
68
91
www.frostyhacks.blogspot.com
I believe the nvidia control panel presents those values to the user, but others can be selected, it's not an Nvidia control panel setting per se, it's a DirectX API one, other tools can set other values.

If you're playing with vsync on then stuttering is most likely coming from the frame rate jumping between several different fixed values. When rendering with vsync on if a frame isn't ready to be displayed when the screen refresh cycles around, the last frame is shown again for the span of the entire refreh, displaying duplicate frames essentially halfs the frame rate (or 1/n where n is the number of duplicate frames)

Unless you can maintain an absolute minimum of 60fps at all time (remember fps counters measure average fps) then you're going to snap violently between 60fps/30fps/20fps etc.
 

pong lenis

Member
Apr 23, 2013
119
0
0
Max Prerendered frames is the size of the context queue, or in other words a buffer of the command list. What happens in DX is that all the API calls get put into a list and are processed initially in the user space part of the graphics driver. Once that is done the processed list is passed through the windows kernel space into the kernel space driver that then executes the commands on the graphics card, but only once the GPU is ready. It has nothing to do with double buffering or vsync, its just another type of buffer that is before the graphics card.

Given that a longer buffer should make input into the GPU smoother, by always having a frame or two waiting to be processed the GPU can always be fully utilised and the game can continue processing given some space in the buffer list. Thus both can work at their peak and any hiccups on either side can be absorbed without impacting the other and loosing frame rate.

The cost of having a large buffer however is that it takes longer for that frame of data to make it onto screen, an extra 16ms per entry in the buffer at the worst case.

Given that and the typical impact why might it be showing the opposite of expected? Well because you play with vsync on. The problem with vsync is that unless you are on exactly 30fps or 60fps everything in between has a stuttering pattern using some combination of 33ms and 16ms frames. 45fps is about the worst of it where 16 and 33 show alternatively and I personally find that is much worse than 30fps consistently. So why might reducing the buffer fix a problem? Well it might be changing the performance of the game (Arma 2 for example looses 10 fps for me on 1 verses 3) such that you move away from a bad pattern that you are noticing.

But here is the thing. Fraps frame times can objectively measure this problem because it measures precisely this cause of problem. So take some frame time captures of default and 1 and look at the difference and it will probably become apparent what is going on. Whatever you find out post the graphs back here, always keen on seeing stutter traces.

I think I should have mentioned that the Fraps FPS counter always shows a constant 60fps in-game during this stuttering, whether it's at 4 pre-rendered frames or 1. And yes it's probably V-sync related, since the stuttering disappears when I use an fps-limiter instead of V-sync.


Here are the graphs, Vsync ON, tested game is Dota 2:






Max pre-rendred frames = 1:

Dwm2013-05-2921-39-07-62_zps1ef71905.png


Dwm2013-05-2921-39-12-98_zpsa1098661.png







Max pre-rendred frames = 4:

Dwm2013-05-2920-25-04-51_zpsfe7b51a1.png


Dwm2013-05-2920-26-55-84_zps83813f9d.png
 
Last edited:

pong lenis

Member
Apr 23, 2013
119
0
0
I believe the nvidia control panel presents those values to the user, but others can be selected, it's not an Nvidia control panel setting per se, it's a DirectX API one, other tools can set other values.

If you're playing with vsync on then stuttering is most likely coming from the frame rate jumping between several different fixed values. When rendering with vsync on if a frame isn't ready to be displayed when the screen refresh cycles around, the last frame is shown again for the span of the entire refreh, displaying duplicate frames essentially halfs the frame rate (or 1/n where n is the number of duplicate frames)

Unless you can maintain an absolute minimum of 60fps at all time (remember fps counters measure average fps) then you're going to snap violently between 60fps/30fps/20fps etc.

But I have triple buffering enabled globally as well, shouldn't that fix this issue?
 

toyota

Lifer
Apr 15, 2001
12,957
1
0
Woah, I guess you learn something new everyday. You'd think Nvidia would mention it in the CP.
they really should because that causes a lot of confusion. whats funny is when people say they turn that setting on and get smoother performance in DX games.
 

omeds

Senior member
Dec 14, 2011
646
13
81
Well the lowest value is 1 not 0, I think perhaps it's AMD cards that have the 0 value available.

There was a 0 value for many years but they removed a few driver revisions ago. 0 for AMD via radeon pro or anything else actually means unlimited/no set amount.
 

pong lenis

Member
Apr 23, 2013
119
0
0
In the past when I've changed this setting from default, raising or lowering, it's only ever resulted in a negative impact on smoothness or no impact whatsoever. So I generally ignore it.

However, I recently changed it to '1' for Skyrim, and to my astonishment, it made the game noticeably smoother (yes, smoother). This is something that I'm absolutely certain of, (I'm rarely ever certain of anything, and very wary of placebo).

For the record, this was with a single GTX 580 running Skyrim at either 60fps@60Hz V-Synced, or 60fps@120Hz using 'Adaptive V-Sync' 1/2 refresh (effectively capping it at 60fps).

If only we could understand why it does this, then we can find the source of the stuttering and make the game even smoother.