microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Very High Resource Usage using 'Retro terminal Effects'

bhenrich opened this issue · comments

commented

Windows Terminal version

1.15.3466.0

Windows build number

10.0.22000.588

Other Software

No response

Steps to reproduce

  • Enable 'Retro Terminal Effects' under the Appearance customization of any terminal.
  • Enable Software Rendering (step added after initial post)
  • Save the changes and close all terminals
  • Run a new terminal

Expected Behavior

Fully functional Terminal styled with the Retro terminal effects.

Actual Behavior

~90% CPU usage (Ryzen 7 5800X 8-Core) and 100% GPU usage (NVIDIA GeForce RTX 3080 Ti)

Desktop.2023.01.21.-.23.32.59.04.mp4

Out of curiosity - what's the impact like on 1.16 Preview/?

commented

Same result. I am also editing the reproduction steps, this problem specifically occurs when software rendering is enabled.

FYI, the performance issues with retro effects have been discussed before in issues #4271 and #12971.

commented

On Windows 10.0.19045.2486 and Terminal version 1.16.3463.0 when setting "experimental.rendering.software": true no spike in CPU usage is observer, however the retro effect is not working. Turning off software rendering enables retro effect again.

On Windows 11 with the software rendering enabled the CPU usage is 100% on a Volterra dev kit.

The retro shader is a significantly more complex shader than the one drawing text. It'll never run performant on the CPU, because contemporary CPUs are simply not fast enough for this.

Because of this you'll notice that you cannot use the retro shader if you enable software rendering in 1.16 Preview if the newer AtlasEngine text renderer is enabled (which it is by default).

I mean yea, this does sound a little by-design to me: "I turned off GPU rendering and turned on a shader, and now the Terminal uses a lot of CPU". Like, yea, that'll happen.

Is there a reason you're using software rendering/?

commented

I use software rendering to minimise the GPU usage of apps like terminal, since my GPU is almost always in heavy use already, be it rendering 3D models, Premiere Pro Sequences or NVENC Streaming.

Also, why does terminal attempt to max out my GPU usage as well, as shown in the video I attached?

I use software rendering to minimise the GPU usage of apps like terminal, since my GPU is almost always in heavy use already, be it rendering 3D models, Premiere Pro Sequences or NVENC Streaming.

If you'd like to you can use AtlasEngine in Windows Terminal Preview. On a GPU like yours, if the GPU is boosting at high clock speeds, it uses approximately 0.008% of GPU time per FPS. In other words, on a blinking cursor (= 1 FPS) you'll see approximately 0% GPU usage and at 144 FPS you'll see approximately 1.1% GPU usage. This usage will appear higher if your GPU is idle, as the GPU will run at much lower clock speeds. (I've tested this on my own RTX 3080.)

Also, why does terminal attempt to max out my GPU usage as well, as shown in the video I attached?

It doesn't use your physical GPU at all. When you enable software rendering we use the "WARP" video adapter, which is a virtual GPU running on the CPU. Due to that it shows up as GPU usage in the Processes tab (in this case: GPU usage = WARP usage), but it won't show up as your physical GPU's usage in the Performance tab.


I'll go ahead and close this issue for bookkeeping reasons, because I believe that this isn't an issue and I've already made it so that this can't happen anymore in our future text renderer. But we can of course continue discussing it here.

commented

Perfect response, thank you for the tip!