View Issue Details

IDProjectCategoryView StatusLast Update
0004414Spring engineGeneralpublic2017-01-07 14:26
ReporterAnarchid Assigned ToKloot  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Product Version97.0.1+git 
Summary0004414: 97.0.1-3 experiences significant performance loss on player roster changes
DescriptionAssuming sufficiently large player count (say 10 people total), joining or removing a "player" - including spectators - seems to cause a massive temporary performance decrease for everyone involved in the room.

This was repeatedly and reproducibly observed on Springie hosts running ZK with Spring 97.0.1-3.

Note that since this also happens with observers, the issue is not likely related to any handling of units or associated lua.

It was not possible to test prior versions yet with sufficient player counts that would make this issue easily reproducible. Same applied to testing with examplemod or BA.

For that reason, the ticket could be considered incomplete. I will fill in the remaining data as it is obtained.

For the reason of incompleteness, i've filed it as "minor" severity.
Steps To Reproduce1) Join a ZK teamgame.
2) ???
3) Suffer.
Additional InformationAre there other ways to profile this besides the ones i outlined in description?
TagsNo tags attached.
Attached Files
20140601_164432_Bandit_Plains_v1_97.0.1-3-gda04dd2 develop.sdf (Attachment missing)
Checked infolog.txt for Errors

Activities

msafwan

2014-06-04 11:29

reporter   ~0013195

Last edited: 2014-06-04 11:29

This is true, I played this sandbox game http://zero-k.info/Battles/Detail/265855 with only 3 player, but when another person join.... it stutter/pauses/lag a lot for few second.

Its like player joining create an infinite loop. Its like some nuke exploding ingame.

silentwings

2014-06-04 12:03

reporter   ~0013196

copy/pasted as request of Anarchid

[11:03] <bluestone_irc> "Note that since this also happens with observers, the issue is not likely related to any handling of units or associated lua. " > use /debug while it happens to check this
[11:04] <xponen> *foreheadpalm* I forgot!
[11:05] <Anarchid> just don't try foreheadnapalm
[11:05] <Anarchid> bluestone_irc i tried that and saw nothing i could process into useful conclusions
[11:05] <bluestone_irc> also, check if it reproduces in demo
[11:05] <Anarchid> oh that's a good idea
[11:05] <Anarchid> i've actually added a question for "how else to profile this" in ticket, can you post it thar?
[11:07] <bluestone_irc> maybe even better way is to run gadget/widget profilers while it happens

abma

2014-06-04 14:51

administrator   ~0013197

"seems to cause a massive temporary performance decrease for everyone involved in the room."

what does that mean? high cpu usage? game slows down but fps keeps the same? fps drops?

Anarchid

2014-06-04 16:09

reporter   ~0013198

Last edited: 2014-06-04 16:10

FPS significantly drops for everyone, simframes seem to take longer to generate.

abma

2014-06-04 16:13

administrator   ~0013199

does the fps increase after some time again? how long is the "drop"?

Anarchid

2014-06-04 16:19

reporter   ~0013200

It seems to generally rebound after a few minutes.

abma

2014-06-05 20:09

administrator   ~0013206

Last edited: 2014-06-05 20:10

do we have a replay where this happened?

edit: forget it. did someone test if replaying the demo causes the fps drop, too?

silentwings

2014-06-05 20:22

reporter   ~0013207

Last edited: 2014-06-05 20:23

I did a quick test with the replay I've just attached (Anarchid gave me it). Players call "laaggg" at about 8 minutes in. In the replay it correlates precisely to a prolonged spike (maybe 30 sec) of abnormally high usage for the "Tactical Unit AI" synced gadget.

I didn't test anything else and I don't know much about this report so please don't take my result as a "there is nothing else here" without asking someone who actually did investigate this.

Anarchid

2014-06-05 20:23

reporter   ~0013208

I and Bluestone went testing yesterday.

I experienced too many random lags for it to be conclusive on my part.
Bluestone reported no performance loss that was coincident with people joining/leaving.

We were testing using this game: http://zero-k.info/Battles/Detail/265052
Note that using ZKL might be quickest way of procuring the game/map/engine, because while the game version is uploaded to rapid, it's not indexed.

I've tried joining a TechA game that was going and they didn't report any fps loss as i was joining.

silentwings

2014-06-05 20:25

reporter   ~0013209

Last edited: 2014-06-05 20:26

"Bluestone reported no performance loss that was coincident with people joining/leaving."

That wasn't exactly what I said - I only know as much as what I've said in the above post on this ticket. The mod version needed is available here: http://packages.springrts.com/builds/ but for some reason does not auto-dl from rapid.

Anarchid

2014-06-05 20:30

reporter   ~0013210

You had one spike for UnitAI but you didn't say anything about any consequential or previous spikes for join/leave being observed for whatever reasons.

Thus you were not observing the thing, which is what i wrote.

silentwings

2014-06-05 20:51

reporter   ~0013211

Last edited: 2014-06-05 20:59

I wasn't aware of if/when players were joining/leaving (I don't even know find that out in ZK) and made no attempt to correlate to it. Your statement above says that I had attempted to correlate to it and had found no correlation, which is not true. E.g. It's entirely possible that a player joining/leaving/reconnecting/etc triggers a bug in "Tactical Unit AI".

Anarchid

2014-06-05 20:59

reporter   ~0013212

Ok i guess while it doesn't strictly say that (it's negation of observation) it can be read this way (observation of negation).

Good that it got disambiguated.

Anarchid

2014-06-06 10:13

reporter   ~0013215

"And about that player leaves goes afk and back type of lag. This was definitely here with 91 I clearly remember that on my laptop. " -- ZK forums

It seems that the issue was present previously, but is now simply exacerbated by something else.

abma

2014-06-06 19:28

administrator   ~0013220

"20140601_164432_Bandit_Plains_v1_97.0.1-3-gda04dd2\ develop.sdf" when watching the replay, i didn't notice any lag from minute 7-9...

abma

2014-06-06 20:08

administrator   ~0013221

not sure if this is a good way to measure:
https://gist.github.com/abma/6ba967cb137c811449ed

highest value i saw was 237 when replaying this demo, but it was for a single frame, nothing continously.

abma

2014-06-06 20:19

administrator   ~0013222

Last edited: 2014-06-06 20:20

hmmm, is speedcontrol maybe broken? with speedcontrol i mean the code that slows down the game when cpu load becomes to high. thats just a wild guess atm...

abma

2014-06-06 21:56

administrator   ~0013224

Last edited: 2014-06-06 21:57

watched a game big game with 23 players & ~10 specs, this is quiet common:

[f=0010044] Connection attempt from <someuser>
[f=0010044] -> Version: 97.0.1-3-gda04dd2 develop
[f=0010044] -> Connection established (given id 31)
[f=0010209] [Game::ClientReadNet] added new player Connetable with number 34 to team 0
[f=0010210] GameFrame() delay: 191

happened every (?) time a player joined.

191 imo is fine, also i read no complains about lags or sth. like that... not sure if 0,2sec lag is noticeable at all if its only a single gameframe.

http://zero-k.info/Battles/Detail/266584

Anarchid

2014-06-06 22:04

reporter   ~0013225

Dunno, it seems like you filter cases where a frame takes more than 0.1s to perform.

FPS could easily drop from 90 to 10 without being detected here.

Google_Frog

2014-06-07 14:49

reporter   ~0013230

I see large ping spikes (2 to 3 seconds) from many players when a spectator joins a large game.

Google_Frog

2014-06-07 19:23

reporter   ~0013231

Also occurs with 97.0.1-18.

cleanrock

2014-06-08 19:24

reporter   ~0013233

Apparently heavy lag for many players when i joined http://zero-k.info/Battles/Detail/267186 at ~18:50.

abma

2014-06-08 20:46

administrator   ~0013234

Last edited: 2014-06-08 20:54

i didn't investigate, but i tested with a springie and local hosted games:

/cheat
/give 1000 armflea and then issued some commands to them.

locally i get:
[f=0000471] Warning: Waiting packet limit was reached for [AG]abma [packets dropped]

on a springie hosted game i don't get this message?? hu?

are Link* settings/limits on springies disabled or set to something insane high?!


or don't i see this messages if i hit remotely such a limit?

this could be useful to debug this maybe...


creating a statistic with demotool / commands per frame maybe helps, too.



with this limits disabled a custom widget could cause this for all players.

Anarchid

2014-06-08 21:02

reporter   ~0013235

From what i can see, the Springie instance running all of ZK atm has blank springsettigs.cfg.

I assume that means it uses all-default settings.

abma

2014-06-08 21:07

administrator   ~0013236

Last edited: 2014-06-08 21:08

hm, zklobby seems to set LinkBandwidth = 0:

https://code.google.com/p/zero-k/source/browse/trunk/other/ZeroKLobby/Resources/Conf/springsettings0.cfg

not sure if spring-dedicated has some bw/packet/cmd-limit or how this affects cmd-limits. springlobby users shouldn't be affected by this as it doesn't disable/set any limit.

Google_Frog

2014-06-09 13:15

reporter   ~0013239

According to this page that LinkBandwidth is not a setting.
http://springrts.com/wiki/Springsettings.cfg

abma

2014-06-10 12:15

administrator   ~0013250

indeed, LinkBandwith was removed some time ago, so this setting does nothing :-|

@cleanrock:

"...heavy lag for many players when..."

lag or fps drop? this bug report mostly is about fps drop...

cleanrock

2014-06-10 16:26

reporter   ~0013257

@abma, gfrog was spec in game when i joined and said this:
[GoogleFrog]cleanrock we're definately getting the load on player join here
gfrog, can you describe what you "saw" when i joined ?

Google_Frog

2014-06-11 09:57

reporter   ~0013265

When cleanrock started joining as a spectator I noticed a spike in CPU and ping for many players as shown on /info.

Kloot

2014-06-11 15:49

developer   ~0013268

Last edited: 2014-06-11 16:31

Nothing about this report makes any sense.

Literally *all* the server does besides very minor bookkeeping when a player joins to spectate or leaves a game is broadcast PlayerAdded or PlayerRemoved events to clients, which then inform Lua. NOTHING ELSE HAPPENS ON THE ENGINE / CLIENT SIDE, so before this goes any further and people possibly waste their time I want to see a ZK test with those specific callins (widgetHandler:Player* AND gadgetHandler:Player*) *disabled* or even better, extended with code that logs how much time each individual widget/gadget takes to execute them.

Kloot

2017-01-07 12:32

developer   ~0017027

Last edited: 2017-01-07 14:26

and as predicted, only 1.5 years later: https://github.com/ZeroK-RTS/Zero-K/commit/3b77d543c53a5020dc49e3aaa014f0d55010760e

Issue History

Date Modified Username Field Change
2014-06-04 09:53 Anarchid New Issue
2014-06-04 11:29 msafwan Note Added: 0013195
2014-06-04 11:29 msafwan Note Edited: 0013195
2014-06-04 12:03 silentwings Note Added: 0013196
2014-06-04 14:51 abma Note Added: 0013197
2014-06-04 16:09 abma Status new => feedback
2014-06-04 16:09 Anarchid Note Added: 0013198
2014-06-04 16:09 Anarchid Status feedback => new
2014-06-04 16:10 Anarchid Note Edited: 0013198
2014-06-04 16:13 abma Note Added: 0013199
2014-06-04 16:19 Anarchid Note Added: 0013200
2014-06-04 16:42 abma Target Version => 98.0
2014-06-05 20:09 abma Note Added: 0013206
2014-06-05 20:10 abma Note Edited: 0013206
2014-06-05 20:22 silentwings Note Added: 0013207
2014-06-05 20:22 silentwings File Added: 20140601_164432_Bandit_Plains_v1_97.0.1-3-gda04dd2 develop.sdf
2014-06-05 20:23 silentwings Note Edited: 0013207
2014-06-05 20:23 Anarchid Note Added: 0013208
2014-06-05 20:25 silentwings Note Added: 0013209
2014-06-05 20:26 silentwings Note Edited: 0013209
2014-06-05 20:30 Anarchid Note Added: 0013210
2014-06-05 20:51 silentwings Note Added: 0013211
2014-06-05 20:52 silentwings Note Edited: 0013211
2014-06-05 20:53 silentwings Note Edited: 0013211
2014-06-05 20:59 Anarchid Note Added: 0013212
2014-06-05 20:59 silentwings Note Edited: 0013211
2014-06-06 10:13 Anarchid Note Added: 0013215
2014-06-06 19:28 abma Note Added: 0013220
2014-06-06 20:08 abma Note Added: 0013221
2014-06-06 20:19 abma Note Added: 0013222
2014-06-06 20:20 abma Note Edited: 0013222
2014-06-06 21:56 abma Note Added: 0013224
2014-06-06 21:56 abma Note Edited: 0013224
2014-06-06 21:57 abma Note Edited: 0013224
2014-06-06 22:04 Anarchid Note Added: 0013225
2014-06-07 14:49 Google_Frog Note Added: 0013230
2014-06-07 19:23 Google_Frog Note Added: 0013231
2014-06-08 19:24 cleanrock Note Added: 0013233
2014-06-08 20:46 abma Note Added: 0013234
2014-06-08 20:47 abma Status new => feedback
2014-06-08 20:47 abma Note Edited: 0013234
2014-06-08 20:47 abma Note Edited: 0013234
2014-06-08 20:50 abma Note Edited: 0013234
2014-06-08 20:52 abma Note Edited: 0013234
2014-06-08 20:53 abma Note Edited: 0013234
2014-06-08 20:54 abma Note Edited: 0013234
2014-06-08 21:02 Anarchid Note Added: 0013235
2014-06-08 21:02 Anarchid Status feedback => new
2014-06-08 21:07 abma Note Added: 0013236
2014-06-08 21:08 abma Note Edited: 0013236
2014-06-09 13:15 Google_Frog Note Added: 0013239
2014-06-10 12:15 abma Note Added: 0013250
2014-06-10 16:26 cleanrock Note Added: 0013257
2014-06-11 09:57 Google_Frog Note Added: 0013265
2014-06-11 15:49 Kloot Note Added: 0013268
2014-06-11 15:50 Kloot Note Edited: 0013268
2014-06-11 15:52 Kloot Note Edited: 0013268
2014-06-11 15:54 Kloot Note Edited: 0013268
2014-06-11 16:31 Kloot Note Edited: 0013268
2014-06-11 16:31 Kloot Note Edited: 0013268
2014-06-11 16:32 Kloot Status new => feedback
2014-06-15 00:52 abma Target Version 98.0 =>
2017-01-07 12:32 Kloot Assigned To => Kloot
2017-01-07 12:32 Kloot Status feedback => closed
2017-01-07 12:32 Kloot Resolution open => no change required
2017-01-07 12:32 Kloot Note Added: 0017027
2017-01-07 14:26 Kloot Note Edited: 0017027