View Issue Details

IDProjectCategoryView StatusLast Update
0003136Spring engineBuildbotpublic2013-05-06 00:51
ReporterFabriceFABS Assigned ToKloot  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version88.0 
Fixed in Version89.0 
Summary0003136: spring-headless seems to use always 100% cpu
DescriptionHi,

I always ran my 6 autohosts in dedicated mode, on the same machine, until yesterday.
Yesterday, I decided to put all my autohosts in Spring-headless mode.
I did some tests and it was perfect...
Except that I did only one test...

When an autohost run alone in spring-headless mode, there is no problem.
During that game, I've tried to start another game is spring-headless mode.

Autohost did join the game as spec, as usual, but it took longuer (+10 good seconds, compared that above, above, it was really quick).
Game started, and, first, ping arrow in red, with 2s ping delay, and 2 sec after, CPU of the autohost shown a 281% pic, and felt down around 200% (advplayerlist info).
Game was slowed down during around 1 minute with those 2 red icons.
After this min, everything came back normal, CPU ok and good ping. - green autohost icons -

During all of this, saw in top/htop info :
- 1 Spads autohost playing a spring-headless mode costs 1 CPU core around 90 and 100% all the game,
- The 2nd spads thats starts put all others core @ 100%... during the famous lag as explained above.
Steps To Reproduce- Simply run same spads on same machine, @ least 2 for the tests,
- Run the 1st in headless mode,
- And Run the second to see the bad results.
Additional InformationMy autohost config :
- Intel Dual-Core Atom processor D525
- Intel Hyper-Threading technology: 2-threads per core,
- Intel 64 architecture, Core clock: 2x 1.8GHz, L2 Cache: 1024kB
- 4 GB DDR3 / 800
- 64 GB SSD OCZ Petrol Series 64 Go SATA 6Gb/s
- Autohost Ethernet LAN connexion to router : 100MB
- Router optical fiber connexion to internet connextion : 50MB

Ubuntu 12.04 - 64 Bits

Any [ACE]Serveur* is running SPADS v0.10.2b (auto-update: unstable), with following components:
Perl v5.14.2 // Spring v88 // PerlAutoHostInterface v0.6f
SimpleLog v0.3 // PerlLobbyInterface v0.12e // SpadsUpdater v0.6d
SpadsConf v0.10.0a

I put a startscript info.
I could give you more infos, or anything else.

All the best,
Fabrice.
TagsNo tags attached.
Attached Files
startscript.txt (Attachment missing)
startscript2.txt (Attachment missing)
infolog.txt (Attachment missing)
GOODinfolog.txt (Attachment missing)
Checked infolog.txt for Errors

Activities

FabriceFABS

2012-06-26 22:01

reporter   ~0008851

I precise that in dedicated mode, I never had any problem to run many spads at the same time !

abma

2012-06-26 22:07

administrator   ~0008852

spring dedicated only forwards traffic, spring-headless runs the whole sim, similar to that what a player computer needs to do. only difference between spring-headless vs spring is that it doesn't output anything.

did you use the config template for spring-headless?

https://github.com/spring/spring/blob/develop/cont/springrc-template-headless.txt

FabriceFABS

2012-06-26 22:38

reporter   ~0008853

Last edited: 2012-06-26 22:39

Changes done to .springrc

A game is running
Starting another autohost :)
Dear... no change :(
Autohost took 23 sec to join/appear in playerlist, and game started after + previous already related (cpu, lag)
I bet all CPU core were @ 100% too...

Have a look to startscript2.txt now

FAB

FabriceFABS

2012-06-26 22:41

reporter   ~0008854

+ infolog.txt :DD

abma

2012-06-27 22:27

administrator   ~0008863

Last edited: 2012-06-27 22:27

i guess vsync should be always enabled for headless and limit to 1fps at all speeds ?!

Kloot

2012-06-27 23:04

developer   ~0008864

Last edited: 2012-06-27 23:06

basically the CPU should only really be awake for CGame::SimFrame in HL builds and sleep when it can (but not too long since net traffic still has to be polled regularly and clients must be able to maintain the 30Hz * speedfactor simframe rate)

ps: using springHL to host instead of springDS is quite... silly

abma

2012-06-27 23:06

administrator   ~0008865

Last edited: 2012-06-27 23:44

using springHL to host makes sense if it runs ais... for anything else its a waste of cpu, yep.

FabriceFABS

2012-07-01 16:04

reporter   ~0008870

Hi there, any news ? ;)

abma

2012-07-07 14:33

administrator   ~0008897

https://github.com/spring/spring/commit/6913511354b27706500c3139c26343c588479cd3 & https://github.com/spring/spring/commit/b88414963e49f9c0345d2e0b7ace463326a371b6

Kloot

2012-07-07 18:43

developer   ~0008906

Last edited: 2012-07-07 18:44

HL builds will now use ~ 50% CPU under normal conditions, but that is obviously a lower limit.

FabriceFABS

2012-07-14 22:08

reporter   ~0008985

Last edited: 2012-07-14 22:11

Hi again,

Yes, I already tried it (on V89), thx, it's really better on the game's starting.

However, it is STILL BUGGY when you play more than 4~5 min....
CPU autohost on ADV playerlist is between 82 and 95% usage, and ping is in red color, up to 2 sec max, never more.

When you pause, 5 sec are needed to see a CPU's autohost usage to normal values ie = 2% + low ping.
When you unpause, bad values comes back again + lag...

Kloot

2012-07-14 23:03

developer   ~0008986

probably now not enough net messages are consumed anymore so the client falls behind and has to play catchup all the time --> higher CPU usage again

Issue History

Date Modified Username Field Change
2012-06-26 21:57 FabriceFABS New Issue
2012-06-26 21:57 FabriceFABS File Added: startscript.txt
2012-06-26 22:01 FabriceFABS Note Added: 0008851
2012-06-26 22:07 abma Note Added: 0008852
2012-06-26 22:37 FabriceFABS File Added: startscript2.txt
2012-06-26 22:38 FabriceFABS Note Added: 0008853
2012-06-26 22:39 FabriceFABS Note Edited: 0008853
2012-06-26 22:41 FabriceFABS Note Added: 0008854
2012-06-26 22:41 FabriceFABS File Added: infolog.txt
2012-06-26 22:46 abma File Deleted: infolog.txt
2012-06-26 22:52 FabriceFABS File Added: infolog.txt
2012-06-26 22:56 FabriceFABS File Added: GOODinfolog.txt
2012-06-26 23:01 abma Summary Spring-headless mode on all Spads : Not possible ? => spring-headless seems to use always 100% cpu
2012-06-27 22:27 abma Note Added: 0008863
2012-06-27 22:27 abma Note Edited: 0008863
2012-06-27 23:04 Kloot Note Added: 0008864
2012-06-27 23:06 abma Note Added: 0008865
2012-06-27 23:06 Kloot Note Edited: 0008864
2012-06-27 23:44 abma Note Edited: 0008865
2012-07-01 16:04 FabriceFABS Note Added: 0008870
2012-07-07 14:33 abma Note Added: 0008897
2012-07-07 18:43 Kloot Note Added: 0008906
2012-07-07 18:43 Kloot Status new => resolved
2012-07-07 18:43 Kloot Fixed in Version => 89.0
2012-07-07 18:43 Kloot Resolution open => fixed
2012-07-07 18:43 Kloot Assigned To => Kloot
2012-07-07 18:44 abma Note Edited: 0008906
2012-07-14 22:08 FabriceFABS Note Added: 0008985
2012-07-14 22:08 FabriceFABS Status resolved => feedback
2012-07-14 22:08 FabriceFABS Resolution fixed => reopened
2012-07-14 22:09 FabriceFABS Note Edited: 0008985
2012-07-14 22:11 FabriceFABS Note Edited: 0008985
2012-07-14 23:03 Kloot Note Added: 0008986
2013-05-06 00:51 jK Status feedback => resolved
2013-05-06 00:51 jK Resolution reopened => fixed