Page 1 of 1

[0.15.10] Lag spikes

Posted: Fri May 12, 2017 11:20 am
by Mango
After updating to 0.15.10 I get spikes in both fps and ups every 2 secs.

The spike is about 0,1s long bud it is still noticable and the game just isn't running smoothly.
It also hapens in newly created map with no factory.

It was fine in 0.15.9.

Re: [0.15.10] Lag spikes

Posted: Fri May 12, 2017 1:14 pm
by metarmask
Can confirm. This post on reddit mentions the issue and has ~8 upvotes. @Mango, press F4 and select `show-time-usage` and take a screenshot when the lag spikes are occurring and when they are not occuring so the developers know where to look for the issue. It would most likely also help with screenshots from 0.15.9.

Re: [0.15.10] Lag spikes

Posted: Fri May 12, 2017 2:23 pm
by kovarex
You should mainly post a log file, so we know your graphics settings and graphics card.
The most probable cause is that you have high graphics settings with not enough of ram and vram and the system is swapping things around.

Re: [0.15.10] Lag spikes

Posted: Fri May 12, 2017 4:24 pm
by metarmask
This seems like a regression, performance was better in 0.15.9 and the only HD texture added was the burner inserter. Here's my log.

Edit:
Just noticed this change in the changelog:
Terrain, shadow and smoke sprites are sorted into separate sprite atlases in attempt to optimize GPU memory access during rendering.
After some experimentation I'm almost certain this change is the cause, having lots of steam/smoke emitting machines in view is what causes the framerate to drop.

Re: [0.15.10] Lag spikes

Posted: Fri May 12, 2017 4:36 pm
by Smarty

Code: Select all

0.000 2017-05-12 15:15:20; Factorio 0.15.10 (build 29654, linux64, steam)
   0.113 Operating system: Linux (Arch rolling)
...
   0.154 System info: [CPU: Intel(R) Core(TM) i5 CPU         750  @ 2.67GHz, 4 cores, RAM: 7979MB]
   0.156 Display options: [FullScreen: 0] [VSync: 1] [UIScale: 100%] [MultiSampling: OFF] [Screen: 255]
   0.259 Available display adapters: 1
   0.259  [0]: resolution 1920x1080px at [0,0]
   0.259 Create display on adapter 0. Size 1280x720 at position [310, 162].
   3.015 Initialised OpenGL:[0] Gallium 0.4 on AMD BARTS (DRM 2.49.0 / 4.10.13-1-ARCH, LLVM 4.0.0); driver: 3.0 Mesa 17.0.5
   3.015     Video memory size (dedicated/total available/current available): 1024/2045/1015 MB
   3.182 Graphics settings preset: high
   3.182 Graphics options: [Graphics quality: high] [Video memory usage: medium] [Light scale: 25%] [DXT: false]
...
   6.764 Checksum for core: 493117188
   6.764 Checksum of base: 3607179770
...
   7.536 Initial atlas bitmap size is 16384
   7.607 Created atlas bitmap 16384x4867
   7.619 Created atlas bitmap 8192x1920
   7.631 Created atlas bitmap 8192x2028
   7.631 Created atlas bitmap 8192x6718
   7.653 Created atlas bitmap 8192x3603
   7.658 Created atlas bitmap 8192x804
  77.463 Sprites loaded
  77.463 Convert atlas 8192x1920 to: mipmap
  77.867 Convert atlas 8192x2028 to: trilinear-filtering
  78.224 Convert atlas 8192x804 to: mipmap
  78.365 Loading sounds...
  83.558 Custom inputs active: 0
  83.634 Factorio initialised
...

Re: [0.15.10] Lag spikes

Posted: Fri May 12, 2017 10:11 pm
by dispensershell
I believe I am also experiencing this issue.

Re: [0.15.10] Lag spikes

Posted: Sat May 13, 2017 9:01 am
by faded
I have noticed the lag spikes too in 0.15.10 and I've never had them ever before in hundreds of hours played in prior versions.

My videocard is a GTX1080 and I have the video settings turned all the way up (at 1440p)

I should hope 8 GB GDDR5X is enough VRAM for Factorio :)

Edit: To clarify, my lagspikes aren't constant or frequent. I noticed them when I was driving a tank or a car and it would go from solid 60FPS to like 20FPS for a a few seconds. It's not all the time and the game is still very much playable, just something I had never encountered prior to 0.15.10

Re: [0.15.10] Lag spikes

Posted: Mon May 15, 2017 8:36 am
by metarmask
I don't think what me and Mango are experiencing is the same as OP because it happens on a newly created map:
Mango wrote:It also hapens in newly created map with no factory
faded wrote:when I was driving a tank or a car
faded, do you experience more frame rate drops when steam engines and furnaces enter your view too? You may also want to post a log as kovarex suggests.

Re: [0.15.10] Lag spikes

Posted: Mon May 15, 2017 2:05 pm
by Mango
Sorry I wasn't home.

So as metarmask suggested here are some images.
when it runs ok:
Image

In the spike:
Image

Re: [0.15.10] Lag spikes

Posted: Mon May 15, 2017 2:37 pm
by kovarex
metarmask wrote:This seems like a regression, performance was better in 0.15.9 and the only HD texture added was the burner inserter. Here's my log.

Edit:
Just noticed this change in the changelog:
Terrain, shadow and smoke sprites are sorted into separate sprite atlases in attempt to optimize GPU memory access during rendering.
After some experimentation I'm almost certain this change is the cause, having lots of steam/smoke emitting machines in view is what causes the framerate to drop.
I'm surprised that it even loads, It works better than expected. Playing with 1GB of vram on high settings and with mods is not what we ever planned.

Re: [0.15.10] Lag spikes

Posted: Mon May 15, 2017 3:23 pm
by posila
faded wrote:I should hope 8 GB GDDR5X is enough VRAM for Factorio :)

Edit: To clarify, my lagspikes aren't constant or frequent. I noticed them when I was driving a tank or a car and it would go from solid 60FPS to like 20FPS for a a few seconds. It's not all the time and the game is still very much playable, just something I had never encountered prior to 0.15.10
8GB is more than enough.

In 0.15.10 I changed sprite atlases so that there are separate atlases for terrain tiles, shadows and game objects (additionally to atlases for trees and icons which we had even before 0.15). Motivation behind the change was to give the graphics driver more choices how to order textures in memory. In high sprite quality all sprites don't fit into single atlas anymore, so I hoped it will improve draw batching. Also it is preparetion for new terrain in 0.16.
So it is quite surprise to me number of reports about performance problems is higher in 0.15.10 (instead of lower) and that perfomance issues even appear on high-end graphics cards with 4+ GB of VRAM.
In 0.15.11 there will be option to disable separating atlases, so I would like to ask you for logs and screenshots with timing measurements with "create specialized sprite atlases" both enabled and disabled when 0.15.11 comes out.

Re: [0.15.10] Lag spikes

Posted: Tue May 16, 2017 3:15 pm
by faded
I have just upgraded to 0.15.11 and I will see if the issue still occurs, if it does, I'll let you know.

edit: After a few hours of playing, so far it hasn't (with 'create specialized sprite atlases' enabled)

Re: [0.15.10] Lag spikes

Posted: Wed May 17, 2017 5:23 pm
by Mango
posila wrote:
faded wrote:I should hope 8 GB GDDR5X is enough VRAM for Factorio :)

Edit: To clarify, my lagspikes aren't constant or frequent. I noticed them when I was driving a tank or a car and it would go from solid 60FPS to like 20FPS for a a few seconds. It's not all the time and the game is still very much playable, just something I had never encountered prior to 0.15.10
8GB is more than enough.

In 0.15.10 I changed sprite atlases so that there are separate atlases for terrain tiles, shadows and game objects (additionally to atlases for trees and icons which we had even before 0.15). Motivation behind the change was to give the graphics driver more choices how to order textures in memory. In high sprite quality all sprites don't fit into single atlas anymore, so I hoped it will improve draw batching. Also it is preparetion for new terrain in 0.16.
So it is quite surprise to me number of reports about performance problems is higher in 0.15.10 (instead of lower) and that perfomance issues even appear on high-end graphics cards with 4+ GB of VRAM.
In 0.15.11 there will be option to disable separating atlases, so I would like to ask you for logs and screenshots with timing measurements with "create specialized sprite atlases" both enabled and disabled when 0.15.11 comes out.
Do you need those images i posted before?

I tried 15.11 with separating atlases both enabled and disabled and I don't have the spikes anymore.

Re: [0.15.10] Lag spikes

Posted: Thu May 18, 2017 10:35 am
by posila
Mango wrote:Do you need those images i posted before?

I tried 15.11 with separating atlases both enabled and disabled and I don't have the spikes anymore.
If you don't have spikes than I guess it is fixed, thanks.

Re: [0.15.10] Lag spikes

Posted: Tue May 23, 2017 4:58 pm
by faded
Unfortunately not fixed (this is 0.15.12), I took some screenshots where the FPS/UPS would just drop to 40 or so FPS for no apparent reason, even happened while standing still.

(videocard is GTX1080 with 8GB vram and CPU is a i7 2600k and 16GB RAM)
50fps.png
50fps.png (5.06 MiB) Viewed 5855 times
60fps.png
60fps.png (7.82 MiB) Viewed 5855 times
48fps.png
48fps.png (6.1 MiB) Viewed 5855 times

Re: [0.15.10] Lag spikes

Posted: Thu May 25, 2017 10:07 am
by kovarex
The time is spent in flip. Do you play with v-sync enabled? What if you toggle it?

Re: [0.15.10] Lag spikes

Posted: Thu May 25, 2017 12:54 pm
by faded
kovarex wrote:The time is spent in flip. Do you play with v-sync enabled? What if you toggle it?
I had v-sync enabled, I have now disabled it and I will let you know if/when it occurs again