protonscr

FTL CPU Consumption - Performance

steamclosed reviewed3rd party game
ValveSoftware/steam-for-linux#479 · opened 2012-12-30 by ghost · updated 2013-11-05 · 4 comments · github
?ghost 2012-12-30 github

FTL consumes an entire core while it is running in window mode. Here is FTL idling on its title screen. It doesn't seem to matter whether or not the game "in action".

Here is what it looks like when I do a ps aux...

josh      4489  0.0  0.0   4400   616 ?        S    12:14   0:00 /bin/sh -c "/home/josh/.local/share/Steam/SteamApps/common/FTL Faster Than Light/FTL"
josh      4490  0.0  0.0  12324  1400 ?        S    12:14   0:00 /bin/bash /home/josh/.local/share/Steam/SteamApps/common/FTL Faster Than Light/FTL
josh      4491  100 24.5 1123680 503208 ?      Rl   12:14   0:16 /home/josh/.local/share/Steam/SteamApps/common/FTL Faster Than Light/data/amd64/bin/FTL
josh      4510  0.0  0.0   9384   920 pts/0    S+   12:14   0:00 grep --color=auto FTL

If one were to observe htop, one of two cores would be at 100%, and the rest of the system is somewhat unresponsive.

I restarted the game in fullscreen mode and got the information from tty. Here's what it looks like, now:

josh      5009  0.0  0.0   4400   616 ?        S    12:29   0:00 /bin/sh -c "/home/josh/.local/share/Steam/SteamApps/common/FTL Faster Than Light/FTL"
josh      5010  0.0  0.0  12324  1396 ?        S    12:29   0:00 /bin/bash /home/josh/.local/share/Steam/SteamApps/common/FTL Faster Than Light/FTL
josh      5011 78.7 24.5 1123972 504120 ?      Rl   12:29   2:39 /home/josh/.local/share/Steam/SteamApps/common/FTL Faster Than Light/data/amd64/bin/FTL
josh      5338  0.0  0.0   9388   924 tty1     S+   12:32   0:00 grep --color=auto FTL

If we use htop while in full screen mode on tty, load seems properly distributed on both cores. It still uses a lot of resources, but I have an older machine. Not sure what an appropriate CPU consumption would be. Here are my specs.

Processor Information:
Vendor: GenuineIntel
Speed: 2400 Mhz
2 logical processors
2 physical processors
HyperThreading: Unsupported
FCMOV: Supported
SSE2: Supported
SSE3: Supported
SSSE3: Supported
SSE4a: Unsupported
SSE41: Unsupported
SSE42: Unsupported

Network Information:
Network Speed:

Operating System Version:
Ubuntu 12.04.1 LTS (64 bit)
Kernel Name: Linux
Kernel Version: 3.2.0-35-lowlatency
X Server vendor: The X.Org Foundation
X Server release: 11103000

Video Card:
Driver: NVIDIA Corporation GeForce 7600 GT/PCIe/SSE2

Driver Version:  2.1.2 NVIDIA 304.48
Desktop Color Depth: 24 bits per pixel
Monitor Refresh Rate: 59 Hz
VendorID:  0x10de
DeviceID:  0x391
Number of Monitors:  1
Number of Logical Video Cards:  1
Primary Display Resolution:  1600 x 900
Desktop Resolution: 1600 x 900
Primary Display Size: 17.44" x 9.80"  (20.00" diag)
                                        44.3cm x 24.9cm  (50.8cm diag)
Primary Bus: PCI Express 16x
Primary VRAM Not Detected
Supported MSAA Modes:  2x 4x 8x 16x 

Sound card:
Audio device:

Memory:
RAM: 2002 Mb

Miscellaneous:
UI Language: English
LANG: en_US.UTF-8
Microphone: Not set
Total Hard Disk Space Available: 298439 Mb
Largest Free Hard Disk Block: 166426 Mb

Installed software:

Recent Failure Reports:

Llievendp 2013-01-01 github

At one time when I bought and installed the game (few days ago) it blocked my system and wouldn't even let me kill the process. Had to go through TTY and reboot machine.

I cannot reproduce this issue, it runs rather ok, except for the "huge" cpu usage. (at 100+% on quad-core) but it is not blocking a single core, the threading looks ok now.

Uploading FTL_cpuhog02.png . . .
Uploading FTL-cpuhog01.png . . .

top - 09:37:10 up 11 min, 2 users, load average: 1.75, 1.07, 0.60
Tasks: 508 total, 2 running, 506 sleeping, 0 stopped, 0 zombie
Cpu0 : 17.7%us, 25.9%sy, 0.0%ni, 47.0%id, 0.5%wa, 0.0%hi, 8.9%si, 0.0%st
Cpu1 : 39.9%us, 60.1%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu2 : 7.8%us, 6.6%sy, 0.0%ni, 85.6%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu3 : 5.2%us, 4.1%sy, 0.0%ni, 90.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 12305968k total, 2615944k used, 9690024k free, 52504k buffers
Swap: 4190996k total, 0k used, 4190996k free, 781420k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3677 lieven 20 0 1116m 500m 33m R 98.7 4.2 2:37.77 FTL
1372 root 20 0 153m 49m 19m S 35.1 0.4 1:17.06 Xorg
2733 lieven 20 0 1238m 190m 56m S 21.4 1.6 0:50.03 compiz
2745 lieven 9 -11 486m 6356 4192 S 2.5 0.1 0:03.85 pulseaudio
3689 lieven 20 0 1116m 500m 33m S 2.5 4.2 0:03.26 FTL
3685 lieven 20 0 1116m 500m 33m S 1.9 4.2 0:02.86 FTL
3686 lieven 20 0 1116m 500m 33m S 1.6 4.2 0:02.34 threaded-ml
2972 lieven 20 0 587m 313m 68m S 1.4 2.6 0:32.95 MainThrd
3688 lieven 20 0 1116m 500m 33m S 1.4 4.2 0:01.82 FTL

System information:

CPU INFO (quad core, one core for reference info)
cat /proc/cpuinfo:
...
processor : 3
vendor_id : AuthenticAMD
cpu family : 16
model : 4
model name : AMD Phenom(tm) II X4 965 Processor
stepping : 3
microcode : 0x10000b6
cpu MHz : 800.000
cache size : 512 KB
physical id : 0
siblings : 4
core id : 3
cpu cores : 4
apicid : 3
initial apicid : 3
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt npt lbrv svm_lock nrip_save
bogomips : 6822.76
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

SYSTEM LINUX
lieven@higgs:~$ uname -a
Linux higgs 3.2.0-35-generic #55-Ubuntu SMP Wed Dec 5 17:42:16 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

GRAPHIC SUPPORT: nvidia gtx 560 ti
lspci -vvv:
...
01:00.0 VGA compatible controller: NVIDIA Corporation GF110 [GeForce GTX 560 Ti](rev a1) (prog-if 00 [VGA controller])
Subsystem: Micro-Star International Co., Ltd. Device 2382
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 18
Region 0: Memory at fc000000 (32-bit, non-prefetchable) [size=32M]
Region 1: Memory at d8000000 (64-bit, prefetchable) [size=128M]
Region 3: Memory at d4000000 (64-bit, prefetchable) [size=64M]
Region 5: I/O ports at bc00 [size=128]
[virtual] Expansion ROM at fe680000 [disabled] [size=512K]
Capabilities:
Kernel driver in use: nvidia
Kernel modules: nvidia_experimental_310, nouveau, nvidiafb

01:00.1 Audio device: NVIDIA Corporation GF110 High Definition Audio Controller (rev a1)
Subsystem: Micro-Star International Co., Ltd. Device 2382
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin B routed to IRQ 19
Region 0: Memory at fe67c000 (32-bit, non-prefetchable) [size=16K]
Capabilities:
Kernel driver in use: snd_hda_intel
Kernel modules: snd-hda-intel
...

Qquaec 2013-01-14 github

Have you tried what they wrote in their FAQ section?

Overheating or excess CPU use?

From within the FTL options menu, enable the Frame Limiter and/or V-sync.

Some systems don’t let the application enable v-sync, so if you’re still having troubles you might need to force it. From within your graphics control panel, you should be able to force on V-Sync (also seen as “Vertical Refresh”) for FTL. Create an application profile if you do not want to effect your entire system.

This helped in my case where I had also a high CPU load.

Wwilbefast 2013-02-17 github

I have the same problem: FTL eats up my CPU like you wouldn't believe, no matter what settings I have for VSync and frame-limit. I don't want to break X messing around with configuration files, so I'm going to try install the proprietary Nvidia drivers in place of the ones I have at the moment just in case the system is preventing VSync.

Ggdrewb-valve maintainer 2013-11-05 github

Closing old non-Valve issue (can still be found in search).

Nothing extracted yet.