Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very High Resource Usage using 'Retro terminal Effects' #14716

Closed
bhenrich opened this issue Jan 21, 2023 · 9 comments
Closed

Very High Resource Usage using 'Retro terminal Effects' #14716

bhenrich opened this issue Jan 21, 2023 · 9 comments
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Product-Terminal The new Windows Terminal. Resolution-By-Design It's supposed to be this way. Sometimes for compatibility reasons.

Comments

@bhenrich
Copy link

bhenrich commented Jan 21, 2023

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
@bhenrich bhenrich added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jan 21, 2023
@zadjii-msft
Copy link
Member

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

@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jan 21, 2023
@bhenrich
Copy link
Author

bhenrich commented Jan 21, 2023

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

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jan 21, 2023
@j4james
Copy link
Collaborator

j4james commented Jan 22, 2023

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

@elsaco
Copy link

elsaco commented Jan 23, 2023

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.

@lhecker
Copy link
Member

lhecker commented Jan 23, 2023

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).

@lhecker lhecker added Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Product-Terminal The new Windows Terminal. labels Jan 23, 2023
@zadjii-msft
Copy link
Member

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/?

@ghost ghost added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Jan 23, 2023
@zadjii-msft zadjii-msft added the Resolution-By-Design It's supposed to be this way. Sometimes for compatibility reasons. label Jan 23, 2023
@bhenrich
Copy link
Author

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?

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jan 23, 2023
@lhecker
Copy link
Member

lhecker commented Jan 23, 2023

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.

@lhecker lhecker closed this as completed Jan 23, 2023
@bhenrich
Copy link
Author

Perfect response, thank you for the tip!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Rendering Text rendering, emoji, complex glyph & font-fallback issues Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Product-Terminal The new Windows Terminal. Resolution-By-Design It's supposed to be this way. Sometimes for compatibility reasons.
Projects
None yet
Development

No branches or pull requests

5 participants