So I made this performance guide because one day I got sick of those shitty performance guides on TF2 that are everywhere, so I decided to put actual effort into mine to make sure it was good.
Before you read any further into this guide, the following information is extremely important not just to understand this guide, but also important when determing performance in games.
-
Not all changes are going to have the same result for everyone. Some players will get a lot of gain with one change, while the other is going to lose a lot with the same change. It's for this reason that the tips in this guide are merely recommendations and not objective facts. You decide if that change is worth it and not anyone else.
-
Always perform proper benchmarks before you accept changes to your configuration. Otherwise you are doing nothing more than wasting your time.
- Fact check claims made by other guides! Verify that they are substantiated with hard evidence (e.g Proper Benchmarks and references to Source Codes if possible). If you don't see any evidence in the guide or can't get any evidence from the author, then do not use that guide as it is bound to be snake oil at that point, otherwise you likely will screw up your computer.
-
Use frame time as the performance metric instead of frame rate (like frames per second or FPS). Frame rate is often misleading, since you can't get the variations in the time it took to render each frame; the game could still be rendering inefficiently regardless if you have 30FPS or 400FPS.[1][2][3][4] For this reason I recommend using frame time as your performance metric. Frame time is a type of metric (typically in milliseconds) that records how long it takes to render a frame. It is a lot more descriptive as it can tell you whether you have a bottleneck in your hardware, slow input latency, or just bad performance.[2][3][4]
-
Do NOT use
cl_showfps 2to record frametime, as that option just derives the frametime from the average frame rate. Deriving frame time from the average frame rate (specifically frametime = 1⁄framerate) just removes any variations that could be present in the rendering stage. I instead recommend using an external frame time recorder like RivaTuner Statistics Server. -
Low frame rate ≠ bad performance and low frame time ≠ high performance. As mentioned above your computer could have more stable frametimes by rendering less frames and vice versa. Both of those metrics and stability are extremely important to measuring and getting good performance. High frame rates + low frame times + high stability = better peformance.
-
-
Document your gaming environment (hardware, software, mods, etc.) in detail! While not all of the information is going to neccessarily be useful, it can help if you ever have to troubleshoot issues.
-
If you're going to make a change that is potentially destructive, at least make a backup so you can revert it.
Before we start please reset your TF2 installation. (Please check the link as I do not mean just reinstalling the game.) Resetting your TF2 installation means that any changes you made that you don't remember won't carry over and fuck you over in the future.
The first thing to do is to get a performance config. Performance configs are mods dedicated to increasing your performance. Everyone knows about them of course, but what people don't know is how to search for a good performance config. Most performance configs are quite terrible; they're outdated, made with no understanding of the source engine, poor documentation, a ton of misconceptions, and have just really bad layouts. Put some research into your desired config and ensure it properly optimizes the game before you choose it; otherwise it will make your game run worse.
The only performance config I can recommend here is mastercomfig. Mastercomfig is a performance config made by mastercoms for modern computers that heavily optimizes the game using on a customization system (named modules). It is significantly better than most performance configs out there, because its changes are backed by actual research and Source code leaks of TF2 and Source Engine (2013). You can get the stable release from the official website or the development version on Github (NOTE: You will need a BASH interpeter to run the package scripts). If you have any trouble running mastercomfig, check the troubleshoot sections of the docs before asking for help.
You can also try out other mods geared towards performance; some are listed on the mastercomfig docs. Like with performance configs, please verify that performance mods actually work, are update to date, rely on proper research and sources, and get proper criticism. Here are examples of performance configs that are not up to date and rely on poor research:
- Comanglia's Config (Primarily not up to date.)
Read the context section again. Lower frame rate ≠ worse performance.
I do not recommend making your own performance config, unless if you know what you are about to get into. Making a performance config requires a lot of understanding of the Source engine (and if the source code isn't public then you'll likely have to reverse engineer the target game to understand how the game renders in general), needs constructive critism from others, good documentation, and a lot of time put in. You can not just put in random cvars and concommands with no research or benchmarks and expect to get better performance; all that does is just spread misinformation and make your config run worse.
The next thing to do is optimize your settings for your configuration.
Your performance regarding frames isn't the only type of performance you have to worry about. You also have to ensure that you have atleast ok performance in terms of networking.
In mathematics interpolation is a means of estimation through other points. Like wise in games interpolation is a method of buffering updates and using newly received packets to compensate for lag.
The Source Engine's interpolation can be somewhat customized through the cl_interp and cl_interp_ratio cvars. cl_interp will buffer packets by its value in seconds while cl_interp_ratio will buffer packets in cl_interp_ratio / cl_updaterate. (e.g cl_interp .5 will buffer packets by 500ms) The priority of those two cvars are determined through their values. If one of the cvar's value is higher than the other then that cvar's value will get used. e.g if the result from cl_interp_ratio / cl_updaterate is higher than cl_interp then that value will get used instead of cl_interp.
-
Set both
cl_interpandcl_interp_ratio! Servers can and will limitcl_interp_ratioso ifcl_interp_ratiois set but notcl_interp, then you're likely going to get screwed over. -
Do not set your interp below 30.3ms. Period. The mastercomfig documentation perfectly summarize the main reasons, but to add on that explanation not all servers can actually handle interp at 30.3ms let alone below that amount, and your connection will never be perfect enough to warrant removing the snapshot buffer.
The servers you play on also has a heavy impact on how your network performance plays out. If you play on terrible servers, then you're going to have shitty network performance. This is the inverse on good servers.
Signs of terrible servers in terms of performance:
-
The server frame rate is unstable (when the server framerate changes constantly). You can check for this with the
net_graphcvar. -
Server frame rate is consistently lower than 66.7. You can check this with
net_graph 4. -
A rate, updaterate, or interp ratio limit is set through the
sv_minX(no exceptions) andsv_maxX(exceptions for updaterate and cmdrate) cvars. -
Server frame time variance is ≥15ms.
STOP TRYING TO LIMIT CLIENTSIDE NETWORK SETTINGS! Do not set sv_minrate, sv_maxrate, sv_minupdaterate, sv_mincmdrate, sv_cl_interp_ratio_min, or sv_cl_interp_ratio_max under any circumstance. Those cvars force the clients' network settings in a range determined by those aformentioned cvars. Limiting the client's network settings is a bad idea because the player will not be able to play at their optimal settings, which may cause them performance issues and in turn may make them leave the server as a result. Only set a maximum updaterate and cmdrate for stability reasons! If you are going to limit net settings at least set the limits to proper values that your server(s) can actually handle.
There are a lot of misconceptions when it comes to general performance in TF2. The mastercomfig website has a fair amount of them in the "misconceptions" section of the documentation, but there are some more misconceptions not covered there.
-
dxlevel 81 on modern hardware makes the game run worse because it uses an inefficient pipeline meant for older systems. If you aren't on a old ass computer, just stick with dxlevel 90.
-
-force_device_idand-force_vendor_id- Your device and vendor id should only be set if your game sets the incorrect device and vendor id on first startup. Otherwise let the game decide the device and vendor id of your system, as you could make the game use the incorrect optimizations for your graphics card.
The game isn't the only thing you need to optimize. Your OS can also have an impact on performance. For instance lets say you have 6 GiB of RAM. If your OS takes up half the available ram, then you'll only have 3 GiB of RAM left for the actual game.
So how do you optimize your OS then? There is a list of OS optimizations you can make on the mastercomfig docs. Additional tips I have is to get rid of power-hungry applications. (Massive example of this is Google Chrome.) You rely on that application? Hunt down an FOSS alternative of it.
-
Remove bloatware and shit applications and use performant alternatives (like FOSS applications/alternatives). In general bloatware and shit applications are going to slow down your computer, so removing/replacing those applications will not only improve your performance but also your privacy. There are sites dedicated to showing awareness of better alternatives of bad programs (Adobe, Google services and Chrome, Microsoft Windows, etc.). One of these I recommend is switching.software as that site is geared towards beginners. There are more programs I want to list that are bloatware/morally corrupt/poorly made and their superior alternatives:
-
Steam and Epic Games Store -> Good Old Games and Playnite. (Obviously you won't be able to completely get rid of Steam, otherwise you won't be able to play Team Fortress 2!)
-
Any sort of Game Booster (is always going to be snake oil) -> NONE. You can always just use your OS's commandline / scripting language to perform optimizations.
-
External antivirii -> Default OS antivirus. External antiviruses were useful back when OS security was not that great (in the 1990s and 2000s). In the modern era however, the security of current OSes is more than enough to protect against viruses and uBlock Origin blocks malware sites, so external antivirus software is not neccessary anymore and will slow down your computer. At this point it's really your fault if you run a virus on your computer.
If you need help getting rid of bloatware, you could use an adware cleaner tool. e.g MalwareBytes adware cleaner.
Remove telemetry, stop unnecessary services, and limit Windows 10's network connections. That's about it. Most W10 performance guides out there are snake oil, because they are written by people with no authoritative credentials, or just have no evidence to back them up.
Your computer's hardware is the main factor in TF2's performance. Optimizations can only go so far.
There are three types of drives: Hard (Disk) Drives (or HDD), Solid-State Drives (or SSD), and Solid-State Hybrid Drives (SSHD). HDDs store content on magnetic discs and read/write from/to them with a platter, while SSDs store content in integrated circuts, where they can be read from or written to. Naturally this makes SSDs superior to HDDs in terms of speed.[6] However electronic storage often wears out faster than magnetic storage, since it can't last as long.^[Needs sources but I'm too lazy to add them in rn.]
I also recommend converting your mods from folders to VPKs to reduce loading time and access calls.
I know I know. Everyone says this but it's true. The only way to get massive performance gains is to get a better computer. Unfortunately not everyone can actually do this. There potentially could not be enough income, too much overtime to do anything, or the inability to get a job to begin with. (No laziness does not count as an excuse to not get a job. See the anime/manga "Welcome to the N.H.K" for reasons why.)
It is possible however to save costs trying to get a good PC! Here's how to do so:
-
NEVER buy PCs from a commercial store like Walmart or Best Buy. PCs from those stores are often unreliable since they're often made in chinese factories (which in turn makes them unreliable), come with bloatware, and are overpriced. Instead get a PC from a build-a-PC service so that you have more control over your PC.
-
Ensure your PC can actually be upgraded. Can your computer be disassembled by the consumer? Is it straightforward to make changes to your PC?
-
When you do order your PC, verify that all components are in working order. If any part or the entire computer is faulty send it back.
[1] a - Why Minimum FPS Can Be Misleading by Jarred Walton on PCGamer.
[2] a b -Frame Rate vs Frame Time by The Computer Graphics and Virtual Reality Lab @ University of Tartu.
[3] a b - What is frame time? Why is frame time important? by Ropaku.
[4] a b - Where minimum-FPS figures mislead, frame-time analysis shines by Renee Johnson on The Tech Report.
[5] a - Go on Windows 10. Open task scheduler and go to the Update Scan tasks located in \Microsoft\Windows\UpdateOrchestrator.
[6] a - Solid State Drive vs. Hard Disk Drive Price and Performance Study by Dell.