Follow TV Tropes

Following

Media Notes / Performance Bottleneck

Go To

A performance bottleneck is when the hardware in a computer system is completely taxed, causing a performance limitation. A common example of this is pairing a relatively weak CPU with a relatively strong GPU and when running a game, its performance isn't as good as other people are getting. As the game logic needs to be figured out before rendering the world, if the CPU spends too much time figuring this out, this limits how many times the GPU is told to render something.

Please note: If you're worried about performance bottlenecks in your system, don't be. There's always a bottleneck in a computer. Instead, set a reasonable, well-defined performance goal (e.g., 60 FPS at 1080p on "Medium" graphical settings) and start worrying if your computer isn't reaching that.

An example: The lifecycle of running a video game

A video game, especially one developed with a big budget, tends to stress most parts of the computer at some point. Obviously the CPU, GPU, and possibly RAM are all taxed, but certain games will also constantly look at storage to swap data in and out. This makes it a useful example to look at when discussing performance bottlenecks.

Let's take an action game, such as a First Person Shooter. The game runs the following steps:

  1. Process the player's inputs (this may not happen every cycle, such checking 30 times per second while the game logic runs at 60 times person second)
  2. Run the logic that needs to happen ("Did an event happen? If so, run A. If not, run B")
  3. Perform AI routines
  4. Perform physics calculations and collision detection
  5. Run the logic that should happen after the previous two steps ("Did this NPC run into a wall?")
  6. Process the audio
  7. Package up what needs to be shown on screen, then send this to the GPU to render

There's a concept of in-game time vs. real time as well. That is, the game is designed to run at a certain rate. If the game doesn't run at this rate reliably, the game starts to appear running faster or slower than real-time. Early video games were typically programmed on computers with only one configuration, so time keeping wasn't a problem. But as computers allowed more configurations, this meant that the CPU speed is not guaranteed, and if the game didn't account for this, the game could run faster or slower. This is prominent in early MS-DOS games programmed for the original IBM PC. When ran on a computer today, they run so fast that it's impossible for a human to play.

To combat this, most games today run at a fixed rate. If the CPU completes the work sooner, the CPU doesn't run the game logic code until the next interval. If the CPU is a little late, it may spill into the next interval to complete the tasks. The breakdown comes if the CPU is always significantly late.

How does hardware limit performance?

The CPU determines the absolute maximum performance. Having a more powerful CPU can help soak up heavier workloads so that performance doesn't hiccup as much. The primary factor that helps with performance is how fast the per-core performance is. As of 2023, most games aren't designed, either by choice or by the nature of the workload being light, to take heavy advantage of more than 4-6 cores. A game may see performance improvements up to 6 cores, but adding any more will generally do nothing. However, if you are multitasking, having more cores does help in this regard.

The GPU determines how much performance to the maximum performance the computer can achieve. For example, a powerful CPU may be able to generate 300 FPS, but its integrated GPU may only achieve 60. By using a faster video card, the computer could achieve up to 300FPS (at which point the CPU becomes the bottleneck). Of particular note is how much VRAM the GPU has. What VRAM primarily affects is how large the texture sizes and rendering resolution can be used before hiccups happen. However, VRAM usage is a nebulous thing as not everything you see on screen takes up everything in VRAM. In fact, some games may cache rendering routines in VRAM for performance reasons. Generally speaking, it's not something to worry about except outside of perhaps 4K gaming with all the bells and whistles.

RAM may have an effect of performance depending how sensitive the system is to memory bandwidth and RAM timings. If you're using an integrated GPU, faster RAM has a measurable performance impact. CPUs generally see improvements using something faster than the slowest RAM available for it. e.g., using DDR4-3200 instead of DDR4-2133 generally shows improvement. How much RAM you have only matters in the sense that as long as the computer isn't running out of it, it's fine.

Storage in general only affects load times to a certain point. After that threshold is met, it's generally CPU performance that takes over as the application still has to set everything up. For games that stream data, such as open world games, having faster performing storage may help with performance. However, modern games try to make this a non-issue by loading in lower quality assets first which are fast to transfer and load in higher quality assets later. While this causes pop-in, this also avoids hiccups where the CPU or GPU is waiting for some asset to be loaded.

The Internet/network doesn't affect in-game performance per se. However, if there's a significant delay between your computer and the server, this does degrade the game play experience by "freezing" the world before it catches up.

Benchmarking

Benchmarking is the act of running a workload, usually the same or a standardized one, to determine the computer's performance in some aspect. With regards to games, some games have a built-in benchmark you can run usually buried in the options menu. Others may have a script (e.g., Quake's time demo), launch option (Crysis), or a separate application (Final Fantasy XIV). Many benchmarks give you a single number: the average FPS. Some benchmarks provide more detailed results, such as the lowest FPS or how much time the CPU and GPU spent rendering a frame.

In addition to game benchmarks, you can also use so-called synthetic benchmarks such as 3DMark. They're called synthetic in that they represent what games may do with the hardware, but with the benefit that the playing field is leveled. That is, some developers may ask a GPU manufacturer for help optimizing their game for their particular hardware in return for logo advertising. So the game will likely run better for GPUs from that manufacturer. So synthetic benchmarks typically don't have any manufacturer-specific optimizations. In fact for 3DMark in particular, the developer stated that none of them wanted it for the product.

To determine if the CPU or GPU is the part holding limiting the performance of the computer, run the benchmark or game at the lowest graphical settings, including the resolution. As the GPU can easily render this for most games, this will give you the highest performance achievable from the CPU (note that in some cases, the CPU may even hit 100% utilization). If this value is roughly the same as the performance at the graphics settings you normally use, the CPU is the limiter here. Note there's no real magic number between the maximum performance and the performance you're getting now to say when to upgrade: it's still totally on you and what helps you sleep at night.

Common Misconceptions

GPUs can bottleneck the CPU

This stems from the idea that because the CPU tells the GPU what to do, if the GPU is too busy to handle rendering requests, then the CPU can't be "taxed" enough, hence a bottleneck. However, in the context of games, the goal is to be able to run through the logic as quickly as possible with time to spare. The CPU doesn't care if the GPU is too busy to accept requests, it just doesn't package up things for the GPU to do. If the goal was to tax the CPU as much as possible, the easiest way to do this is to lower the clock speed of the CPU, which of course, sounds kind of ridiculous.

Usage of bottleneck calculators

There exists a few places on the internet that attempt to calculate how much of a bottleneck your system has. A major problem with these sites is they give one number and provide no context as to what this number means. For example, if the calculator claims you'll have a 20% performance bottleneck, does this mean it'll be a problem all over the place or in certain situations? At best, this may tell you what the weakest link is if you need to think about what to upgrade, but take these websites with a grain of salt.

Top