View Issue Details

IDProjectCategoryView StatusLast Update
0005363Spring engineGeneralpublic2016-10-07 18:35
ReporterGoogle_Frog Assigned Tohokomoko  
PriorityhighSeveritymajorReproducibilityrandom
Status resolvedResolutionno change required 
Product Version103.0 
Summary0005363: Poor performance that randomly occurs throughout an entire game
DescriptionSometimes I notice that ZK is running with very low FPS (<15), even in the early stages of a 1v1 when there are few units. This low FPS persists for the entire game. In other games the performance is fine. I have heard similar reports from other people.

I have run the ZK benchmarker and found a similar result, around half the games have a framerate around 10 while the others have a framerate around 30.

https://docs.google.com/spreadsheets/d/1zF_iFzwMiWR0J2lLfgiyH9z5-Vff6wq8vjZgqNKa2Xs/edit?usp=sharing
TagsNo tags attached.
Attached Files
20160927_150745_cold_snap_v1_103.0.1-134-g819e5b4 develop SLOW GAME.sdfz (Attachment missing)
infolog.txt (Attachment missing)
coreTemp.jpg (Attachment missing)
Checked infolog.txt for Errors

Activities

Google_Frog

2016-10-02 15:23

reporter   ~0016712

I have not finished bisecting with the benchmarker. I thought the problem started around 103.0.1-90 until I collected more runs. I will run more runs around 100.0 to 103.0.

hokomoko

2016-10-02 15:39

developer   ~0016713

try to get a screenshot of /debug during the poor performance

Google_Frog

2016-10-02 16:50

reporter   ~0016714

Here is a set of screenshots with debug view. http://imgur.com/a/y2mAM

The screenshots compare the framerates of icon view and rendering view. At first I thought that the performance issue was to do with rendering so I modified my benchmarks to have a zoomed in view of the game. Then I forgot about this connection and forgot to include it.

My current benchmark is a 6v6 East vs West AI game. Factories selection and placement is hardcoded in a gadget, all factories are Shield factories. The camera is fixed looking at the center of the map like this: http://i.imgur.com/9HXOzQ0.jpg

The game is run at 20x speed until 7:55. "speedy_dt" measures how long it takes to get from the start of the game to 7:55. This time has been increasing with the past few engine versions which may also be a worry. "w_update_dt(avg)" is the average time between widget:Update calls between minutes 8 and 9. The other important bit of data is "units_start", this is the number of units at minute 8 and exists as a sanity check to make sure the run looks reasonably normal.

hokomoko

2016-10-02 16:58

developer   ~0016715

Ok, it seems to be something with projectile drawing.
Did you check if it replicates consistently when running a demo?

Google_Frog

2016-10-02 17:29

reporter   ~0016716

Yes, I will attach a replay which reproduces the issue. I don't think projectiles are related because barely any projectiles are used in this replay.

hokomoko

2016-10-02 17:31

developer   ~0016717

Check the screenshot. DrawProjectile takes a disproportionate chunk of time

hokomoko

2016-10-02 17:35

developer   ~0016718

You may be right though, since graphics lag doesn't necessarily affect the part responsible

Google_Frog

2016-10-02 17:44

reporter   ~0016719

The cold snap replay shows some very weird behaviour, shown in screenshots here: http://imgur.com/a/PHb1q

By 22:19 I have low FPS with a normal camera view. I turned off luaui and luarules to remove the effect of lups and had a look around to see what was causing it. I found that FPS can change significantly based on the location of the camera. An example of this change is in the second and third images of the album. Both images were taken at 30:09 while the game was paused. The only difference between them is a small camera movement. To reproduce this just zoom out to a similar level and move the camera around while keeping track of your FPS.

The dependence on camera position might mean that the benchmark variation is not due to a significant difference between the games. The variation might just be due to what is being viewed.

hokomoko

2016-10-03 00:14

developer   ~0016720

Last edited: 2016-10-03 00:14

can you attach the exact an infolog from viewing this replay?

Google_Frog

2016-10-05 12:44

reporter   ~0016742

Here are some more screenshots http://imgur.com/a/CvkR9 from this game http://zero-k.info/Battles/Detail/432113

abma

2016-10-05 19:10

administrator   ~0016743

in several screenshots there are 10k queued updates.

this bug report is a bit confusing:

there are screenshots of game a
demo of game b
infolog.txt game c

all this info from one game would be much more useful.

hokomoko

2016-10-05 19:16

developer   ~0016744

The most updates I saw was 0001017:0002500 (remember these are 2 numbers), anyway, there seems to be enough info currently. I'll have to work on it before if/what I need more

abma

2016-10-05 19:19

administrator   ~0016745

http://imgur.com/a/y2mAM

the first one (+ others)
10146 - 16

hokomoko

2016-10-05 19:23

developer   ~0016746

Ah sorry, I thought you've meant the latest imgur link

Google_Frog

2016-10-07 15:47

reporter   ~0016749

The GeForce Windows 10 64-bit driver version 373.06 (latest driver) may have fixed this problem. I have had no problems so far and can report back if the fix was just a fluke. I had previously tested a few driver versions, however, this driver was released on the 6th of October.

The bug may be caused by my GPU powering down after running Spring for a few minutes. The load on my GPU core could go as low as 15% while I had poor FPS, I will attach a screenshot to show what I mean. The new drivers seem to have fixed this problem.

abma

2016-10-07 18:35

administrator   ~0016751

this time: nvidia sucks ;-)

@Google_Frog: thanks for investigating this/the feedback!

Issue History

Date Modified Username Field Change
2016-10-02 15:21 Google_Frog New Issue
2016-10-02 15:23 Google_Frog Note Added: 0016712
2016-10-02 15:39 hokomoko Note Added: 0016713
2016-10-02 16:50 Google_Frog Note Added: 0016714
2016-10-02 16:58 hokomoko Note Added: 0016715
2016-10-02 17:29 Google_Frog Note Added: 0016716
2016-10-02 17:29 Google_Frog File Added: 20160927_150745_cold_snap_v1_103.0.1-134-g819e5b4 develop SLOW GAME.sdfz
2016-10-02 17:31 hokomoko Note Added: 0016717
2016-10-02 17:35 hokomoko Note Added: 0016718
2016-10-02 17:44 Google_Frog Note Added: 0016719
2016-10-03 00:14 hokomoko Note Added: 0016720
2016-10-03 00:14 hokomoko Note Edited: 0016720
2016-10-03 10:00 hokomoko Assigned To => hokomoko
2016-10-03 10:00 hokomoko Status new => assigned
2016-10-03 15:36 Google_Frog File Added: infolog.txt
2016-10-05 12:44 Google_Frog Note Added: 0016742
2016-10-05 19:10 abma Note Added: 0016743
2016-10-05 19:16 hokomoko Note Added: 0016744
2016-10-05 19:19 abma Note Added: 0016745
2016-10-05 19:23 hokomoko Note Added: 0016746
2016-10-07 15:47 Google_Frog Note Added: 0016749
2016-10-07 15:48 Google_Frog File Added: coreTemp.jpg
2016-10-07 18:35 abma Note Added: 0016751
2016-10-07 18:35 abma Status assigned => resolved
2016-10-07 18:35 abma Resolution open => no change required