0.78+ CPU Usage Increase, Lots of Lag

0.78+ CPU Usage Increase, Lots of Lag

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
thesleepless
Posts: 417
Joined: 24 Oct 2007, 04:49

0.78+ CPU Usage Increase, Lots of Lag

Post by thesleepless »

Ever since 0.78 i've been getting a huge increase in spring CPU usage to the point where it's becoming unplayable where before I never had a speed issue even on large games.

I'm running an Athlon 64 3000+ with 2GB of RAM and a GeForce 6200
Running under Linux (archlinux)

Graphics settings are at minimum, when opening the profiler most of the cpu seems to be in Sim Time, is there a way to output the profile data to text somehow?

Anyone else having this issue or have any idea what might be causing it?
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: 0.78+ CPU Usage Increase, Lots of Lag

Post by lurker »

How many cores?
User avatar
thesleepless
Posts: 417
Joined: 24 Oct 2007, 04:49

Re: 0.78+ CPU Usage Increase, Lots of Lag

Post by thesleepless »

just one
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: 0.78+ CPU Usage Increase, Lots of Lag

Post by zerver »

Sorry to say, but Athlon 3000+ is an old CPU. I suggest playing smaller games with limited unit count. You could also ask the other players if it is ok for them if you manually reduce the game speed.

.78 Spring uses a different method for regulating the game speed:

Old: Target is 50% cpu (excluding rendering)
New: Target is 75% cpu (including mandatory rendering)

Look at your cpu usage ingame (/info).
If it is > 75% you have a problem, and 100% cpu means ~2fps.

Consider upgrading to any dual/multi core machine and get the SMP spring version, which allows you to go all the way to 100% cpu with little fps impact.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: 0.78+ CPU Usage Increase, Lots of Lag

Post by KDR_11k »

Meh, I have the same CPU, it doesn't lag much.
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: 0.78+ CPU Usage Increase, Lots of Lag

Post by zerver »

It also depends on the graphics of course.

That CPU is about 5 years old. Most computers can be expected to last for 3-5 years, with a decent level of performance that is.
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Re: 0.78+ CPU Usage Increase, Lots of Lag

Post by Acidd_UK »

thesleepless wrote:Ever since 0.78 i've been getting a huge increase in spring CPU usage to the point where it's becoming unplayable where before I never had a speed issue even on large games.

I'm running an Athlon 64 3000+ with 2GB of RAM and a GeForce 6200
Running under Linux (archlinux)

Graphics settings are at minimum, when opening the profiler most of the cpu seems to be in Sim Time, is there a way to output the profile data to text somehow?

Anyone else having this issue or have any idea what might be causing it?
Does the sim time in the profiler include the lua interpreter?
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: 0.78+ CPU Usage Increase, Lots of Lag

Post by lurker »

I would guess it includes all the lua that runs during callins from the sim code, but not the lua from draw calls. The profiling functions are pretty simple.
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Re: 0.78+ CPU Usage Increase, Lots of Lag

Post by Acidd_UK »

I'm just guessing we are using Lua much more heavily in 'modern' mods than we ever used to, and Lua interpreter is relatively slow, so maybe that's what's causing more CPU useage?
User avatar
thesleepless
Posts: 417
Joined: 24 Oct 2007, 04:49

Re: 0.78+ CPU Usage Increase, Lots of Lag

Post by thesleepless »

zerver wrote:Sorry to say, but Athlon 3000+ is an old CPU. I suggest playing smaller games with limited unit count. You could also ask the other players if it is ok for them if you manually reduce the game speed.
With 0.77b5 was playing fine with an Athlon XP 2000+ with 1GB RAM and an older GPU (I just upgraded to the 64 3000+ so upgrading again isn't going to happen), something is wrong if 0.78 is causing such a slowdown...

btw this is happening on BA 6.61 which ran fine on 0.77b5 on the same CPU so i don't think it's a mod/lua issue.

Sometimes CPU goes above 75%, even to 100% occasionally, this never happened on 0.77b5.

out of curiosity, why was the cpu usage target changed?
and shouldn't spring aim to use as much cpu as possible while its doing work and then yield its timeslice once it's done?
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: 0.78+ CPU Usage Increase, Lots of Lag

Post by zerver »

thesleepless wrote:out of curiosity, why was the cpu usage target changed?
and shouldn't spring aim to use as much cpu as possible while its doing work and then yield its timeslice once it's done?
It was upped because it now includes the mandatory rendering in order to give a better picture of the overall system speed. With the old system, someone who had really slow graphics (or even software rendering :P) would drop because the system did not take rendering cpu time into account at all.

The reason for upping the target as much as 25% is that quite a lot of guys do indeed have slow graphics, so there would otherwise be a big risk of many really slow running games.

Spring uses all the remaining CPU for extra rendering. So at 75% cpu the remaining 25% will be used to boost the fps.
Post Reply

Return to “Engine”