high cpu usage

high cpu usage

Discuss everything related to running Spring on your chosen distribution of Linux.

Moderator: Moderators

Post Reply
mmaura66
Posts: 23
Joined: 26 Dec 2008, 18:06

high cpu usage

Post by mmaura66 »

hello,


i don t understand why but, where there are lot of units, my cpu lag hard, really hard and my ping expend 20k.

it s not a graphic probleme, changing graphic configuration not realy change cpu usage.

i build myself spring with this script for normal

Code: Select all

#!/bin/bash

cd spring_0.81.1.3

#export CFLAGS="-Wall -g -O0 -O2"
export CFLAGS="-Wall -g -O0 -O2 -pipe"

make clean

cmake -DCMAKE_INSTALL_PREFIX=/usr -DBINDIR=/usr/games -DCMAKE_VERBOSE_MAKEFILE=0 -DMARCH_FLAG= -DUSE_GML=0 -DUSE_GML_SIM=0 .
make -j4

sudo checkinstall --install=yes -y

echo fini
read
and this for MT

Code: Select all

#!/bin/bash

cd spring_0.81.1.3

export CFLAGS="-Wall -g -O0 -O2 -pipe"

make clean

#cmake  -DCMAKE_INSTALL_PREFIX=/usr -DBINDIR=/usr/games -DCMAKE_VERBOSE_MAKEFILE=0 -DMARCH_FLAG= -DUSE_GML=1 -DUSE_GML_SIM=1 -DUSE_GML_DEBUG .
cmake  -DCMAKE_INSTALL_PREFIX=/usr -DBINDIR=/usr/games -DCMAKE_VERBOSE_MAKEFILE=0 -DMARCH_FLAG= -DUSE_GML=1 -DUSE_GML_SIM=1 .
make -j4

sudo checkinstall --install=yes -y

echo fini
read
When i use MT framerate is better, system have better reponse, but cpu usage is red too and ping expence too.

my configuration is :

memoire DDR3 G.Skill Extreme Series HK 4Go
processeur AMD ATHLON II X4 630
carte graphique GAINWARD 9800GT-512


someone think were the probleme is ?
there a way to do some spring benchmark other than look replay ?

thank you
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: high cpu usage

Post by Beherith »

Wow that is a pretty good system, it shouldnt really have any performance issues.
How many units do you consider a lot?
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: high cpu usage

Post by Auswaschbar »

a) if you want performance, don't build with debug, set CMAKE_BUILD_TYPE=RELEASE
b) high pings are network issue, disable other programs wich use alot of bandwith
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: high cpu usage

Post by hoijui »

what Aus said, and instead of -DBINDIR=/usr/games, you should use -DBINDIR=games. that is not performance relevant of course, but it is the recommended way, and can help prevent some ugly issues.
same goes of other DIR vars that are relative (see default values inside CMakeLists.txt), eg. LIBDIR and DATADIR, in case you would use them.

about this:

Code: Select all

export CFLAGS="-Wall -g -O0 -O2 -pipe"
you should not set CFLAGS at all, plus of course the debug symbols (-g) could make it slower, and .. i don't think that -O0 and -O2 can be used simultaneously (one of them will be ignored), plus spring sync is not guaranteed for anything else then -O2 (even doh it should generally work).
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: high cpu usage

Post by Auswaschbar »

hoijui wrote:you should not set CFLAGS at all, plus of course the debug symbols (-g) could make it slower, and .. i don't think that -O0 and -O2 can be used simultaneously (one of them will be ignored), plus spring sync is not guaranteed for anything else then -O2 (even doh it should generally work).
He can set cflags as he wishes, they are ignored anyway :twisted:
SirMaverick
Posts: 834
Joined: 19 May 2009, 21:10

Re: high cpu usage

Post by SirMaverick »

Auswaschbar wrote:a) if you want performance, don't build with debug, set CMAKE_BUILD_TYPE=RELEASE
side note: I did that and then used ccmake to change the gcc version to avoid desync. This somehow reset the build type (empty) so that spring was build without optimizations.
mmaura66
Posts: 23
Joined: 26 Dec 2008, 18:06

Re: high cpu usage

Post by mmaura66 »

thank you for all your reponses.

i have make this script :

Code: Select all

#!/bin/bash

cd spring_0.81.1.3


make clean

cmake  -DCMAKE_INSTALL_PREFIX=/usr -DBINDIR=games -DCMAKE_VERBOSE_MAKEFILE=0 -DMARCH_FLAG= -DUSE_GML=1 -DUSE_GML_SIM=1 -DCMAKE_BUILD_TYPE=RELEASE .
make -j4

sudo checkinstall --install=yes -y

echo fini
read
the result give more fps but, not realy signifiant.
mmaura66
Posts: 23
Joined: 26 Dec 2008, 18:06

Re: high cpu usage

Post by mmaura66 »

i think i have hardware probleme, i lag when cooler turn more quick
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: high cpu usage

Post by Auswaschbar »

Yeah CPU trottles when its overheating, in that case also fan spins faster.
mmaura66
Posts: 23
Joined: 26 Dec 2008, 18:06

Re: high cpu usage

Post by mmaura66 »

i confirm updated my bios resolv the probleme, thank you for help.
denialmark
Posts: 1
Joined: 24 Mar 2010, 09:46

Re: high cpu usage

Post by denialmark »

After I log in, my system slows to a crawl. Looking at task manager I see that my computer is experiencing high CPU usage. Looking more closely I see that something called "svchost" is taking 100% of my CPU time. If I kill the process suddenly other things stop working. Is svchost a virus? How do I fix this svchost problem?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: high cpu usage

Post by hoijui »

you sure you are on linux? (this is the Linux Forum)
With log in, do you mean log onto the lobby with TASClient? SpringLobby?
try disabling the downloader of your lobby/not auto start it at lobby start. give some version info (of the lobby, your OS).
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: high cpu usage

Post by Tobi »

svchost is the program on Windows that runs services. As such the post is in the wrong forum :-)

Anyway (just a random guess) maybe it's virus scanner service extensively scanning all the files from which SpringLobby/TASClient loads minimaps?

There are tools to find out what services are hosted by which svchost processes.
Post Reply

Return to “Linux”