Framerate and Performance: Difference between revisions

From Vintage Story Wiki
no edit summary
No edit summary
No edit summary
 
(9 intermediate revisions by 2 users not shown)
Line 6: Line 6:


<!--T:2-->
<!--T:2-->
Generally, each new major version of Vintage Story should have better performance: version 1.15 was noticeably better than 1.14, for example. Also, Vintage Story switched from .NET 4 to .NET 7, which resulted in drastically better performance for clients and servers alike. Be sure to run the most recent version to ensure you are running with the best performance possible.
Generally, each new major version of Vintage Story should have better performance. Also, from mid version 1.18, Vintage Story switched from using .NET 4 to .NET 7, which resulted in drastically better performance for clients and servers alike. Be sure to run the most recent version to ensure you are running with the best performance possible.


===Basic performance tips - if the game runs slow=== <!--T:4-->
===Basic performance tips - if the game runs slow=== <!--T:4-->


<!--T:34-->
<!--T:34-->
With appropriate settings, most players should be able to achieve playable framerates (such as 30fps) even on older hardware. Modern gaming machines should have over 72fps with all settings maximised.  
With appropriate settings, most players should be able to achieve high framerates and smooth gameplay. Modern gaming machines should have well over 72fps, often 120fps or more, even with all settings maximised. At medium settings, good framerates such as 60fps can be achieved even on older hardware.


First, make sure to read through the {{ll|Troubleshooting_Guide#Game_Runs_Slow|Game Runs Slow Guide}}.  
First, make sure to read through the {{ll|Troubleshooting_Guide#Game_Runs_Slow|Game Runs Slow Guide}}.  
Line 22: Line 22:
* If you have a high-powered graphics card and the game still stutters sometimes when moving, try '''increasing''' the Chunk Upload Rate Limiter, a mid-range setting like 3 or 4 seems to be best for most people but the optimum is different on every setup, it may need to be higher.  
* If you have a high-powered graphics card and the game still stutters sometimes when moving, try '''increasing''' the Chunk Upload Rate Limiter, a mid-range setting like 3 or 4 seems to be best for most people but the optimum is different on every setup, it may need to be higher.  


Try also adjusting Max FPS and VSync settings, it's best first to check performance with Max FPS set to '''Unlimited''' and VSync off.  But please do also try MaxFPS set to a number around the framerate you are seeking to achieve: things may actually work better if it is set to 72 or 120fps (for example) compared with Unlimited.
Try also adjusting Max FPS and VSync settings. It's best first to check performance with Max FPS set to '''Unlimited''' and VSync off.  But please do also try MaxFPS set to a number around the framerate you are seeking to achieve: things may actually work better if it is set to 72 or 120fps (for example) compared with Unlimited.


For any unexplained issue (especially if you're new to Vintage Story, or you just upgraded your PC or graphics card), try updating or fully re-installing your graphics drivers. Unexplained issues sometimes are due to subtly broken or out-dated graphics drivers or some weird setting made by another game, re-installing should reset everything properly.
For any unexplained issue (especially if you're new to Vintage Story, or you just upgraded your PC or graphics card), try updating or fully re-installing your graphics drivers. Unexplained issues sometimes are due to subtly broken or out-dated graphics drivers or some weird setting made by another game, re-installing should reset everything properly.


Finally, especially if it's an occasional stutter issue like once every few seconds, look at [[Framerate_and_Performance#Causes outside Vintage Story|possible causes '''outside Vintage Story''']] - in particular, if you are using the '''Discord app''' while playing - as a lot of people like to do - look at that as a possible cause, try shutting it down completely and see if that solves the issue.
For issues still not resolved, especially if it's an occasional stutter issue like once every few seconds, look at [[Framerate_and_Performance#Causes outside Vintage Story|possible causes '''outside Vintage Story''']] - in particular, if you are using the '''Discord app''' while playing - as a lot of people like to do - look at that as a possible cause, try shutting it down completely and see if that solves the issue. (More precisely it's the "Hardware Acceleration" feature in the Discord app, which is on by default; depending on hardware, this feature is known to cause problems for Vintage Story and many other games, it is a topical debate.)
 
Do bear in mind also that some '''mods''' can increase the load on your system. For testing and solving framerate issues it is best to test in the vanilla (unmodded) game and get things working properly in that first. Then introduce mods one by one and see if things are still good.


===Advanced Tips for Maximizing Performance=== <!--T:5-->
===Advanced Tips for Maximizing Performance=== <!--T:5-->


<!--T:35-->
<!--T:35-->
1. If, in Single Player, you run into large lag spikes after some time playing you could be bottlenecked by lack of system memory (in extreme cases it can also crash with OutOfMemory exceptions, including graphics OutOfMemory issues). On Medium settings, Vintage Story needs about 4GB-6GB of free RAM to run smoothly, plus approximately 2GB of headroom for your graphics drivers.  While the game is playable if you have 8 GB or less system RAM, that may not be enough for totally smooth performance; 16 GB of system memory is recommended.  To help smoothness with low amounts of memory, in the game settings, try reducing view distance to 192 blocks or even less and then you should be able to run the game on most systems with low RAM: it is also wise to close your web browser and all other running programs. If it's your own computer it is well worth considering purchasing more RAM, upgrading to 16GB or even 32GB or more. Buying more RAM can be a cost-effective upgrade in comparison to a new graphics card or CPU.  
1. If, in Single Player, you run into large lag spikes after some time playing you could be bottlenecked by lack of system memory (in extreme cases it can also crash with OutOfMemory exceptions, including graphics OutOfMemory issues). On Medium settings, Vintage Story needs about 4GB-6GB of free RAM to run smoothly, plus approximately 2GB of headroom for your graphics drivers.  While the game is playable if you have 8 GB or less system RAM, that may not be enough for totally smooth performance; 16 GB of system memory is recommended, or even more than that for large modpacks.  To help smoothness with low amounts of memory, in the game settings, try reducing view distance to 192 blocks or less and then you should be able to run the game on most systems with low RAM: it is also wise to close your web browser and all other running programs. If it's your own computer it is well worth considering purchasing more RAM, upgrading to 16GB or even 32GB or more. Buying more RAM can be a cost-effective upgrade in comparison to a new graphics card or CPU.  


<!--T:23-->
<!--T:23-->
Line 40: Line 42:


<!--T:10-->
<!--T:10-->
3. Vintage Story has a wide range of graphics settings. In the Settings menu, Graphics tab, click "Show all available settings" to see them all. Adjusting these up or down, and switching on or off the fancier elements, can have a huge effect on performance, especially on older or mid-range graphics cards (GPUs). The tooltips on each control on the Graphics settings page should give you some pointers. Switching off Shadows, SSAO and Bloom will have the biggest effect on framerate for most people. Even dropping your Shadows and SSAO from the highest settings down a notch should grant a significant gain in framerate.
3. Vintage Story has a wide range of graphics settings. In the Settings menu, Graphics tab, click "Show all available settings" to see them all. Adjusting these up or down, and switching on or off the fancier elements, can have a huge effect on performance, especially on older or mid-range graphics cards (GPUs). The tooltips on each control on the Graphics settings page should give you some pointers. Switching off Shadows, SSAO and Bloom will have the biggest effect on framerate for most people. Even dropping your Shadows and SSAO from the highest settings down a notch should grant a significant gain in framerate. Some people find that toggling Occlusion Culling helps.


<!--T:24-->
<!--T:24-->
Line 46: Line 48:


<!--T:11-->
<!--T:11-->
''Large view distances or unusually high world heights have an effect not only on the framerate (fps) on screen, but also performance throughout the game. If everything is sluggish or there are frequent lag spikes, try turning down the view distance. The game is balanced to be smooth and playable on most modern PCs at view distances around 256 blocks to 512 blocks, depending on your hardware. Playing at above 512 blocks is certainly possible on most PCs - but long-term play at such large view distances with max graphics is best left only for high-end gaming PCs who followed the advice in step #1...''
''Large view distances or unusually high world heights have an effect not only on the framerate (fps) on screen, but also performance throughout the game. If everything is sluggish or there are frequent lag spikes, try turning down the view distance. The game is balanced to be smooth and playable on most modern PCs at view distances around 256 blocks to 512 blocks, depending on your hardware. Playing at above 512 blocks is possible on many PCs, though it depends on the amount of video memory (VRAM) available. Long-term play at large view distances with max graphics settings is best left only for high-end gaming rigs...''


<!--T:12-->
<!--T:12-->
Line 52: Line 54:


<!--T:13-->
<!--T:13-->
5. Make sure your CPU is not overheating and therefore "thermally throttling". If you run Vintage Story with no VSync and unlimited frame rate, it will push one of your CPU cores to 100% permanently. That in turn will cause the CPU internal temperature to rise. You can monitor temperatures using a free 'Hardware Monitor' tool, or just listen to the fan noise ramping up! If the CPU internal temperature is approaching maximum allowed levels (90-100 °C on a modern CPU, that's hot enough to boil water) then the CPU will automatically switch to running slower than its maximum speed, this is "thermal throttling". This will slow down the game's performance. To prevent this thermal issue, use VSync or max frame rate limits to prevent your CPU cores reaching 100% usage - limiting the max frame rate to something sensible like 60fps or 72fps allows the system to rest for a short while between frames, and therefore reduces the chance of overheating. At unlimited frame rates, GPUs can also overheat and thermally throttle, again the solution is a combination of proper cooling of the GPU, and not pushing graphics settings to their max limit.
5. Make sure your CPU is not overheating and therefore "thermally throttling". If you run Vintage Story with no VSync and unlimited frame rate, your GPU and perhaps also one CPU core might be being pushed to 100% permanently. That in turn will cause the CPU and GPU internal temperatures to rise. You can monitor temperatures using a free 'Hardware Monitor' tool, or just listen to the fan noise ramping up! If the CPU internal temperature is approaching maximum allowed levels (90-100 °C on a modern CPU, that's hot enough to boil water) then the CPU will automatically switch to running slower than its maximum speed, this is "thermal throttling". A GPU acts similarly. Thermal throttling of either one will slow down the game's performance. To prevent this thermal issue, use VSync or a sensible max frame rate limit, or both, to prevent your CPU and GPU reaching maximum temperature - limiting the max frame rate to something sensible like 60fps or 75fps allows the system to rest for a short while between frames, and therefore reduces the chance of overheating. At unlimited frame rates, GPUs can also overheat and thermally throttle, again the solution is a combination of proper cooling of the GPU, and not pushing graphics settings to their max limit.


<!--T:14-->
<!--T:14-->
''Tip: on a multi-core PC, the overall CPU usage percentage shown by Windows can look small even if one core is maxed out. For example, with 8 cores, one core maxed out at 100% would only be 12.5% CPU usage overall. To see what's really going on, you need to use a non-Microsoft tool like Hardware Monitor.''
''Tip: on a multi-core PC, the overall CPU usage percentage shown by Windows can look small even if one core is maxed out. For example, with 8 cores, one core maxed out at 100% would only be 12.5% CPU usage overall. To see what's really going on, you need to use a third-party tool like Hardware Monitor.''


<!--T:15-->
<!--T:15-->
''(Note that VintageStory does use multithreading for efficient performance. That is why the game runs best on a CPU with 4 cores or more. But the main rendering thread, which is one of the limits on FPS, runs on a single core.)''
''(Note that VintageStory does use multithreading for efficient performance. But not all cores are used equally, the main thread runs on a single core. Windows Task Manager can show the main rendering thread as busy when it is not really busy, on normal game settings the CPU is spending some time each frame just waiting for the GPU to catch up. A third-party tool like Open Hardware Monitor can give you a better picture of how the hardware is really being used.)''


<!--T:16-->
<!--T:16-->
Line 64: Line 66:


<!--T:20-->
<!--T:20-->
6. If you experience lag spikes with no obvious cause in the game (you have a good GPU, reasonable graphics settings not too high, and plenty of RAM free) the cause could be [[Framerate_and_Performance#Causes outside Vintage Story|outside Vintage Story]]. For example, Discord has been known to cause occasional lag spikes on some systems.
6. If you experience lag spikes with no obvious cause in the game (you have a good GPU, reasonable graphics settings not too high, and plenty of RAM free) the cause could be [[Framerate_and_Performance#Causes outside Vintage Story|outside Vintage Story]]. For example, Discord hardware acceleration features have been known to cause occasional lag spikes on some systems.


''Tip: You can troubleshoot the possible causes of lag spikes yourself by running the command <code>.debug logticks 50</code> and then afterwards examining the `client-main.txt` log file in VintagestoryData/Logs.''  You can ask a more experienced player or a team member for help interpreting the output.
''Tip: You can troubleshoot the possible causes of lag spikes yourself by running the command <code>.debug logticks 40</code> and then afterwards examining the `client-main.txt` log file in VintagestoryData/Logs.''  You can ask a more experienced player or a team member for help interpreting the output.


<!--T:25-->
<!--T:25-->
Line 75: Line 77:


<!--T:27-->
<!--T:27-->
9. There's a known issue on '''Radeon''' graphics cards - including high end Radeon cards - about GPU availability, more like memory lock contention. The issue is normally only seen on max graphics settings (with shadows enabled) and is most obvious when moving across the map so that a lot of new map loads, there can be '''noticeable frame rate drops and stutter'''. Game version 1.15.7 and above has a change that slightly improves this, we hope to do even more to work around it in future versions, but it is a hardware/GPU issue. For anyone bothered by the issue, a solution is to ease the pressure on the GPU by turning down some of the top end settings (SSAO and Shadows or reduce the MaxFPS) so that the GPU has some idle time each frame.
9. There's a known issue on '''Radeon''' graphics cards - including high end Radeon cards - about GPU availability, more like memory lock contention. The issue is normally only seen on max graphics settings (with shadows enabled) and is most obvious when moving across the map so that a lot of new map loads, there can be '''noticeable frame rate drops and stutter'''. Game version 1.15.7 and above has a change that slightly improves this, Chunk Upload Rate Limiter setting at higher levels might also help, but ultimately it is a hardware/GPU issue. For anyone bothered by the issue, a solution is to ease the pressure on the GPU by turning down some of the top end settings (SSAO and Shadows or reduce the MaxFPS) so that the GPU has some idle time each frame.


<!--T:28-->
<!--T:28-->
10. The Occlusion Culling graphics setting is recommended on any modern multi-core CPU (4 cores or more) - it uses one additional CPU thread but leads to less work for the GPU. This can drastically increase performance while playing with high render distances.
10. The Occlusion Culling graphics setting is recommended on any modern multi-core CPU (4 cores or more) - it uses one additional CPU thread but leads to less work for the GPU. This can drastically increase performance while playing with high render distances. However, try toggling it - on a few systems things might be smoother if it is switched off.


<!--T:29-->
<!--T:29-->
Line 104: Line 106:
# Start the game again
# Start the game again


15. Volumetric Shading mod: <nowiki>https://mods.vintagestory.at/volumetricshadingupdated</nowiki>
:''See also:'' {{ll|Troubleshooting_Guide#Game_Runs_Slow|Troubleshooting Guide}}
 
CRITICALLY IMPORTANT: You MUST use the <code>v0.7.2-pre.2</code> version which is only found by clicking on Files and selecting the second option. ''All other versions will crash you''  
 
Using it for performance:


# Download and activate this client side mod in your game.
====Nvidia graphics====
# Ctrl+C to configure while ingame
Some Nvidia graphics cards (but not all) can experience stutters or micro-stutters in the game when everything else is set up correctly and it should be smooth. It is worth experimenting with different VSync settings, and also different Nvidia Control Panel settings (especially relating to VSync or framerates).
# Uncheck all options except for <code>Deferred Lighting</code> and <code>Improve SSAO</code>
# Ctrl+C again to close menu, and enjoy the game<!--T:32-->


:''See also:'' {{ll|Troubleshooting_Guide#Game_Runs_Slow|Troubleshooting Guide}}
For a fuller guide to Nvidia Control Panel settings, see [[https://www.vintagestory.at/forums/topic/6244-potential-fix-for-stuttering-nvidia-cards/|this forum thread]].


====For Linux users==== <!--T:33-->
====For Linux users==== <!--T:33-->
Line 161: Line 157:
* Make sure it's not 3rd party mods causing it
* Make sure it's not 3rd party mods causing it
* If you have more than a couple of players, make sure your hardware is strong enough to support your player base. Virtual Servers have a tendency to perform rather badly at 10+ players. Bare metal works best.
* If you have more than a couple of players, make sure your hardware is strong enough to support your player base. Virtual Servers have a tendency to perform rather badly at 10+ players. Bare metal works best.
* You can run <code>/debug logticks 100</code> to see where most time is spent on, feel free to ping tyron on discord to interpret the results or ask others in discord if they are familiar with the issues.
* You can run <code>/debug logticks 100</code> to see where most time is spent on, feel free to open an issue on Discord to interpret the results or ask others in Discord if they are familiar with the issues.


=== Causes outside Vintage Story ===
=== Causes outside Vintage Story ===
Other software on your computer, including things installed when the computer was new, can take control of your computer periodically in a way which causes Vintage Story performance to suffer.  Look at this possibility if the game performance is 'normally' good, but there is a short lag spike or stutter every few seconds, or freezes (1-2 seconds or longer).
Other software on your computer, including things installed when the computer was new, can take control of your computer periodically in a way which causes Vintage Story performance to suffer.  Look at this possibility if the game performance is 'normally' good, but there is a short lag spike or stutter every few seconds, or freezes (1-2 seconds or longer).


Especially look out for this type of thing on a new Windows 10 or Windows 11 PC.  Windows is notorious for installing apps and processes which you don't actually need, but take up resources, and your PC manufacturer may have added even more of that (they get paid a few cents for each one).
Especially look out for this type of thing on a new Windows 10 or Windows 11 PC.  Windows is notorious for installing apps and processes which you don't actually need, but take up resources, and your PC manufacturer may have added even more of that (maybe they even were paid to do so?)
 
In general, to achieve its normal high performance, Vintage Story makes intensive use of all parts of your system while playing: GPU, CPU, RAM, network in multiplayer. If something is wrong in your system set-up or some other software or app is also using resources, you will likely see that in the form of lag spikes.


For testing and troubleshooting game performance, you should try closing down '''all''' other software and apps while playing the game:
For testing and troubleshooting game performance, you should try closing down '''all''' other software and apps while playing the game.  If that solves the performance problem, then add things back and see if it's still OK!
* Start by closing your browser, all tabs especially YouTube or other video players.  If you need internet access to look things up or to read this page (!), it is suggested to use your phone or a different PC
* Start by closing your browser, all tabs especially YouTube or other video players.  If you need internet access to look things up or to read this page (!), it is suggested to use your phone or a different PC
* Close any music player
* Close any music player
* Close down '''Discord''' completely (note: by default, Discord remains running but dormant, see miniaturized icons in the collection to the right of your Windows taskbar, sometimes called the [https://www.windowscentral.com/tour-windows-10-taskbar-and-what-its-icons-do Overflow area]): Discord has been known to produce severe (but uncommon) lag spikes while playing Vintage Story on some systems, so shut it down, see if that fixes the problem. If Discord is the problem, as above you can perhaps use Discord instead on your phone if you need it while playing
* Close down '''Discord''' completely (note: by default, Discord remains running but dormant, see miniaturized icons in the collection to the right of your Windows taskbar, sometimes called the [https://www.windowscentral.com/tour-windows-10-taskbar-and-what-its-icons-do Overflow area]): Discord has been known to produce severe (but uncommon) lag spikes while playing Vintage Story on some systems, so shut it down, see if that fixes the problem. If Discord is the problem, as above you can perhaps use Discord instead on your phone if you need it while playing - or you can try going into Discord's settings, the "Voice and Video" and "Advanced Settings" and switching off Hardware Acceleration in '''both''' places.
* Prevent Windows (or your other operating system) from doing heavy tasks while you are playing, including virus scans, disk indexing service, Windows Update etc. etc. - switch off all of that, at least while testing. For Windows, [https://www.oo-software.com/en/shutup10 OOSU10] offers several satisfying settings to take more control of your own PC, and is free.
* Prevent Windows (or your other operating system) from doing heavy tasks while you are playing, including virus scans, disk indexing service, Windows Update etc. etc. - switch off all of that, at least while testing. For Windows, [https://www.oo-software.com/en/shutup10 OOSU10] offers several satisfying settings to take more control of your own PC, and is free.
* On Windows, check the '''Task Manager''', Start-up tab, disable everything which is not essential (probably only one or two things there are truly essential, including audio and mouse software), and re-start Windows for a clean start
* On Windows, check the '''Task Manager''', Start-up tab, disable everything which is not essential (probably only one or two things there are truly essential, such as audio and mouse software), and re-start Windows for a clean start
* On Windows, now check the '''Task Manager''', Processes.  Ideally you want to see that steadily at 0.1% CPU, 0% Disk, 0% Network when the game is not running, the main thing using CPU should be Task Manager itself.  Click on the CPU heading, to order tasks by which one is using the most CPU.  Any process more than 0.1% CPU, consider shutting it down now (right-click and choose End Task), unless it is System or some other essential part of Windows: if using Task Manager like this is new to you, proceed with caution, look up online guides to the processes or ask a knowledgeable friend for help
* On Windows, now check the '''Task Manager''', Processes.  Ideally you want to see that steadily at 0.1% CPU, 0% Disk, 0% Network when the game is not running, the main thing using CPU should be Task Manager itself.  Click on the CPU heading, to order tasks by which one is using the most CPU.  Any process more than 0.1% CPU, consider shutting it down now (right-click and choose End Task), unless it is System or some other essential part of Windows: if using Task Manager like this is new to you, proceed with caution, look up online guides to the processes or ask a knowledgeable friend for help
* If you want to go deeper down this rabbit-hole on Windows, open the '''Task Scheduler''', typically there can be 50-100 or more tasks listed under various tabs there which various software has added. These tasks run sometimes, can include when you are in the middle of a game.  In most cases you don't need any of that, or very little of it: take care over any task added by the Windows system itself.  Again, if using Task Scheduler is new to you,  proceed with caution!
* If you want to go deeper down this rabbit-hole on Windows, open the '''Task Scheduler''', typically there can be 50-100 or more tasks listed under various tabs there which various software has added. These tasks run sometimes, can include when you are in the middle of a game.  In most cases you don't need any of that, or very little of it: take care over any task added by the Windows system itself.  Again, if using Task Scheduler is new to you,  proceed with caution!
Confirmedusers, editor
348

edits