Low GPU Utilization and resulting low frames (Nvidia / Linux)

Fixed Linux
LokienS [github] · 4 years ago

Issue description

Lower than expected framerate and low GPU utiliization (power draw & % utilization), regardless of graphics settings. No issue with other proton enabled games. Other games pulling 115W & 100% gpu utilization with my current configuration (laptop capable of even more on windows).

OS: Linux (Arch based EndeavourOS)
GPU: Nvidia 3080 Laptop (latest drivers)
Laptop: Lenovo Legion 7i

2022-08-06_20-01

Expected behavior

Higher GPU utilization & frame rate

Reproduction steps

Run game, frame rate drops to 20 fps in most crowded part of mid/late game map. Let me know how to help debug further.

Game version

v0.4.9c

Attachments

_No response
2022-08-06_20-09
_

deimosian · 4 years ago

I experience the same thing, the CPU is the bottleneck, the game's main thread is maxing out one core, and that causes the GPU to be underutilized.
This is not uncommon with factory games and probably not a bug.
Have you looked at the output of top or similar while the game is running?

For reference:

# deimosian @ behemoth in ~ [21:23:10] 
$ nvidia-smi
Sat Aug  6 21:23:12 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.57       Driver Version: 515.57       CUDA Version: 11.7     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Quadro P3000        Off  | 00000000:01:00.0  On |                  N/A |
| N/A   49C    P0    23W /  N/A |   3250MiB /  6144MiB |     48%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A       856      G   /usr/lib/Xorg                     173MiB |
|    0   N/A  N/A     21055    C+G   ...y\Captain of Industry.exe     3072MiB |
+-----------------------------------------------------------------------------+
# deimosian @ behemoth in ~ [21:28:12] 
$ top

top - 21:27:34 up 1 day, 16:07,  3 users,  load average: 6.77, 6.62, 5.97
Tasks: 314 total,   2 running, 311 sleeping,   0 stopped,   1 zombie
%Cpu(s): 33.1 us, 10.2 sy,  0.0 ni, 44.8 id,  0.1 wa, 11.8 hi,  0.1 si,  0.0 st
MiB Mem :  31513.1 total,  11707.5 free,  10974.2 used,   8831.4 buff/cache
MiB Swap:      0.0 total,      0.0 free,      0.0 used.  18387.0 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND 
21055 deimosi+  20   0   22.4g   6.9g 560264 S 312.3  22.4   1726:37 Captain of Indu
LokienS [github] · 4 years ago

I experience the same thing, the CPU is the bottleneck, the game's main thread is maxing out one core, and that causes the GPU to be underutilized. This is not uncommon with factory games and probably not a bug. Have you looked at the output of top or similar while the game is running?
...

Thank you for chipping in, please see below a pull from htop & cpu freqs. Although 1 thread is quite a high %, I think theres some headroom still? Is it normal that an i9-11980HK bottlenecks down to 20fps? (I don't think my map qualifies as megabase yet)


    0[||||||||||||         38.7%]   4[||||||||||           32.9%]   8[||||||||||            36.1%] 12[||||||||||            34.0%]
    1[||||||||||           37.5%]   5[|||||||||            33.3%]   9[|||||||||||           35.9%] 13[||||||||||            31.5%]
    2[|||||||||||          38.4%]   6[||||||||||           33.3%]  10[||||||||||            33.3%] 14[||||||||||            34.7%]
    3[||||||||||           35.2%]   7[|||||||||||||        43.9%]  11[|||||||||||           35.7%] 15[|||||||||||           35.8%]
  Mem[||||||||||||||||||||||||                       7.88G/31.2G] Tasks: 114, 864 thr, 225 kthr; 16 running
  Swp[                                                   0K/512M] Load average: 8.13 7.16 4.88 
                                                                  Uptime: 00:18:07

  [Main] [I/O]
    PID PRI  NI  VIRT   RES   SHR S  CPU%▽NCPU% MEM%   TIME+  Command
   4896  20   0 29.1G 4935M  560M R 584.6  36.5 15.4  1h34:46 Captain of Industry\Captain of Industry.exe
   4985  20   0 29.1G 4935M  560M S  79.6   5.0 15.4 11:22.89 Captain of Industry\Captain of Industry.exe
   4924  20   0 29.1G 4935M  560M S  28.8   1.8 15.4  3:58.91 Captain of Industry\Captain of Industry.exe
   4926  20   0 29.1G 4935M  560M R  28.1   1.8 15.4  3:58.54 Captain of Industry\Captain of Industry.exe
   4928  20   0 29.1G 4935M  560M R  28.1   1.8 15.4  3:58.76 Captain of Industry\Captain of Industry.exe
   4929  20   0 29.1G 4935M  560M R  28.1   1.8 15.4  3:57.82 Captain of Industry\Captain of Industry.exe
   4933  20   0 29.1G 4935M  560M R  28.1   1.8 15.4  3:58.51 Captain of Industry\Captain of Industry.exe
   4934  20   0 29.1G 4935M  560M S  28.1   1.8 15.4  3:58.01 Captain of Industry\Captain of Industry.exe
   4935  20   0 29.1G 4935M  560M S  28.1   1.8 15.4  3:58.46 Captain of Industry\Captain of Industry.exe
   4923  20   0 29.1G 4935M  560M S  27.4   1.7 15.4  3:57.88 Captain of Industry\Captain of Industry.exe
   4925  20   0 29.1G 4935M  560M S  27.4   1.7 15.4  3:58.32 Captain of Industry\Captain of Industry.exe
   4927  20   0 29.1G 4935M  560M R  27.4   1.7 15.4  3:57.96 Captain of Industry\Captain of Industry.exe
   4930  20   0 29.1G 4935M  560M S  27.4   1.7 15.4  3:58.78 Captain of Industry\Captain of Industry.exe
   4931  20   0 29.1G 4935M  560M R  27.4   1.7 15.4  3:58.27 Captain of Industry\Captain of Industry.exe
   4936  20   0 29.1G 4935M  560M S  27.4   1.7 15.4  3:58.90 Captain of Industry\Captain of Industry.exe
   4937  20   0 29.1G 4935M  560M S  27.4   1.7 15.4  3:59.06 Captain of Industry\Captain of Industry.exe
   4932  20   0 29.1G 4935M  560M S  26.8   1.7 15.4  3:58.96 Captain of Industry\Captain of Industry.exe
   4984  20   0 29.1G 4935M  560M S  25.4   1.6 15.4  3:54.17 Captain of Industry\Captain of Industry.exe
  27569  20   0 2636M  237M  119M S   8.9   0.6  0.7  1:02.96 firefox -contentproc -childID 19 -isForBrowser -prefsLen 30975 -prefMa
   4769  20   0 45188 16324  3356 S   6.2   0.4  0.0  0:45.23 Proton - Experimental/files/bin/wineserver
   4834  20   0 1893M 37332 20680 S   5.5   0.3  0.1  0:09.21 C:\windows\system32\explorer.exe /desktop
    708  20   0 24.7G 54768 30632 S   4.8   0.3  0.2  0:19.05 Xorg :0 -seat seat0 -auth /run/lightdm/root/:0 -nolisten tcp vt7 -novt
   3482  20   0 4593M  224M  123M S   3.4   0.2  0.7  0:24.46 steamwebhelper --type=renderer --disable-seccomp-filter-sandbox --log-
   5195  20   0  616M 65684 43536 S   3.4   0.2  0.2  0:04.56 xfce4-terminal
   1633  10 -10  556M  273M  202M S   2.7   0.2  0.9  0:23.73 steam
   3467  20   0 4593M  224M  123M S   2.7   0.2  0.7  0:37.68 steamwebhelper --type=renderer --disable-seccomp-filter-sandbox --log
Cores: 16
Architecture: x86_64
Driver: acpi-cpufreq

------------------------------ Current CPU stats ------------------------------

CPU max frequency: 3201 MHz
CPU min frequency: 800 MHz

Core	Usage	Temperature	Frequency
CPU0:	 34.7%     68 °C     3868 MHz
CPU1:	 48.5%     66 °C     1855 MHz
CPU2:	 35.1%     68 °C     4500 MHz
CPU3:	 36.5%     64 °C     1790 MHz
CPU4:	 34.7%     66 °C     1861 MHz
CPU5:	 32.6%     65 °C     1700 MHz
CPU6:	 36.4%     66 °C     2062 MHz
CPU7:	 36.1%     66 °C     1900 MHz
CPU8:	 39.4%     68 °C     1500 MHz
CPU9:	 34.4%     66 °C     1500 MHz
CPU10:	 34.4%     68 °C     1500 MHz
CPU11:	 36.1%     64 °C     1900 MHz
CPU12:	 32.3%     66 °C     2600 MHz
CPU13:	 32.7%     65 °C     1700 MHz
CPU14:	 35.7%     66 °C     1700 MHz
CPU15:	 38.9%     66 °C     2000 MHz

---------------------------- CPU frequency scaling ----------------------------

Battery is: charging

Setting to use: "ondemand" governor

Total CPU usage: 36.9 %
Total system load: 8.02
Average temp. of all cores: 66.12 °C 

High CPU load
setting turbo boost: on
deimosian · 4 years ago

I have seen many games limited by a single thread while the CPU overall has plenty of headroom. What you're seeing is consistent with my experience, my base is smaller but I am on an older CPU. I find zooming in to work on thing makes the game more responsive. I think this is more an optimization issue than a bug per se.

Obviously this is just my take, the devs may have another, not trying to shut you down, just chipping in.

Captain Filip Captain Filip · 4 years ago

We have made significant optimizations in v0.4.12. This should increase the performance. One of the reasons why the GPU might not be utilized well is that we were not using instancing and other opitmization as much as we should. This will be an ongoing effort and we will bring more optimizations in the future.

Captain Filip Captain Filip · 3 years ago

Closing as we track performance efforts separately and this bug has nothing actionable at this point. We will keep investing in improving the pefromance in general.

Closed as ✅ Fixed

12 Showing 1–6 of 6