ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.25k stars 175 forks source link

High CPU usage when download #6684

Open howdev opened 5 years ago

howdev commented 5 years ago

Your system information

Please describe your issue in as much detail as possible:

CPU usage goes up high when downloading. 40% CPU graph in system monitor. Same continue to happen when download resume from pause. Restart Steam, still not resolve. Stop the download and CPU usage drops. sys-monitor-steam

Steps for reproducing this issue:

  1. Open Steam
  2. Download a purchased game
  3. Watch the system monitor CPU activity
kisak-valve commented 5 years ago

Hello @howdev, the usage you've described is within expectations for SteamPipe.

howdev commented 5 years ago

If that is the case, does that mean SteamPipe uses more CPU than other applications that download?

If SteamPipe uses this much CPU when downloading, then is not suitable to play a game and download at the same time, since it will reduce the performance of the game

howdev commented 5 years ago

What does SteamPipe actually do that use this much CPU?

Plagman commented 5 years ago

It does a lot of decryption, decompression, and delta-patching work. You're right that in some situations, it's not suitable to play a game and download at the same time; for this reason, I believe downloading games while playing is off by default and has to be explicitly enabled by the user.

rcorre commented 4 years ago

@kisak-valve what is within expectations for download CPU consumption? I've recently noticed my client get up to ~100% cpu during downloads. I'm pretty sure this only started in the past month or two.

Steam client version Nov 14 2019
Distribution Archlinux
Opted into Steam client beta?: Yes
Have you checked for system updates?: Yes
dakyskye commented 4 years ago

Experiencing the same.

dinotheextinct commented 4 years ago

Same issue, system was almost unuseable while Steam was downloading a new proton prefix. This is unacceptable.

rcorre commented 3 years ago

I just started downloading Phoenix Point, and steam consumed over 300% CPU on an AMD 5600X pretty much the whole download.

 PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
 2722 rcorre    20   0  833844 520036 242920 S 341.5   1.6   4:14.77 steam

I see this is marked as "Not a bug" -- is that accurate?

I'm on Linux 5.14.8-arch1-1, with the Sept. 17th steam build.

theoparis commented 3 years ago

I have an AMD Ryzen 5 2600, but my cpu usage in top -i and htop seems really high as well and I'm just updating my games. g5k2a

Because of this, my cpu is running at 75 - 80 C instead of 50-60, and it also means I need to keep everything else closed if it is downloading...

I'm using a more recent version of Arch Linux than rcorre is: 5.14.14-arch1-1

es20490446e commented 2 years ago

I'm using Steam downloads for cooking bacon (vegan bacon).

MartinX3 commented 2 years ago

I'm using Steam downloads for cooking bacon (vegan bacon).

Do you like crossfit? Btw I use arch while my laptop cocks my vegan bacon.

es20490446e commented 2 years ago

They banned me in Arch, and I have never looked back.

Now I have my own packaging system, with over 50 packages.

Tell the Arch guys that they can suck my brail.

MartinX3 commented 2 years ago

I don't know how to achieve that, but I also have a list of people who can suck my toilet seat, especially in the IT.

es20490446e commented 2 years ago

Their lost 😛

MartinX3 commented 2 years ago

Maybe they should accelerate themselves on the GPU 🧐

zany130 commented 2 years ago

I have an AMD Ryzen 5 2600, but my cpu usage in top -i and htop seems really high as well and I'm just updating my games. g5k2a

Because of this, my cpu is running at 75 - 80 C instead of 50-60, and it also means I need to keep everything else closed if it is downloading...

I'm using a more recent version of Arch Linux than rcorre is: 5.14.14-arch1-1

+1 also using a ryzen 5 2600

limiting it to 500mbps instead of allowing it to reach about 800mbps (I have gigabit internet) reduces the CPU usage drastically and no longer causes my system to stutter

sys info

inxi -b
System:
  Host: Kiseki Kernel: 5.17.5-256-tkg-pds arch: x86_64 bits: 64
    Desktop: KDE Plasma v: 5.24.5 Distro: Garuda Linux
Machine:
  Type: Desktop Mobo: ASRock model: X470 Taichi serial: <superuser required>
    UEFI: American Megatrends v: P4.86 date: 01/27/2022
CPU:
  Info: 6-core AMD Ryzen 5 2600X [MT MCP] speed (MHz): avg: 4077
    min/max: 2200/3600
Graphics:
  Device-1: NVIDIA GP104 [GeForce GTX 1080] driver: nvidia v: 510.68.02
  Display: x11 server: X.Org v: 21.1.3 with: Xwayland v: 22.1.1 driver: X:
    loaded: nvidia gpu: nvidia,nvidia-nvswitch resolution: 1: 2560x1080
    2: 3840x2160~60Hz
  OpenGL: renderer: NVIDIA GeForce GTX 1080/PCIe/SSE2
    v: 4.6.0 NVIDIA 510.68.02
Network:
  Device-1: Intel I211 Gigabit Network driver: igb
Drives:
  Local Storage: total: 2.96 TiB used: 3.02 TiB (102.1%)
Info:
  Processes: 462 Uptime: 45m Memory: 31.27 GiB used: 11.97 GiB (38.3%)
  Shell: fish inxi: 3.3.15
dement6d commented 1 month ago

I have an AMD Ryzen 5 2600, but my cpu usage in top -i and htop seems really high as well and I'm just updating my games.

I'm using an AMD Ryzen 5 2600X (12) and my system is pretty much unusable while updating games on Steam. For example, when I'm updating a game and I try to open the terminal, the terminal window may or may not open and when it does; it takes forever to load the shell (zsh in my case). I can't click anything in my browser or run most apps, I can't navigate tabs in my browser with CTRL+TAB, almost everything on my system is unusable. My games also often take forever to launch and sometimes don't seem like they will launch at all so I have to restart Steam or cancel launching and try again. That's also an issue since closing steam even through htop (if I manage to open it due to all the lag Steam causes) takes quite a bit of time and I can't kill every steam process instantly even with SIGKILL and SIGTERM signals. The cancel button also takes forever to take any effect.

I'm on 6.10.10-arch1-1 using DWM, NVIDIA GeForce GTX 1080 Ti and 64GB ram

es20490446e commented 2 weeks ago

🔴 IMPORTANT

The most likely cause of this issue is not CPU utilization, but IO cache starvation for other applications.

To fix this problem Steam shall implement as IO write mode "write-through". Aka flush pieces to storage as soon as they complete validation.