Fps and sometimes UPS issues when playing 0.16 (outdated in 0.17)

We are aware of them, but they have low priority. We have more important things to do. They go here in order not to take space in the main bug thread list.
Steen
Burner Inserter
Burner Inserter
Posts: 16
Joined: Wed May 10, 2017 6:12 pm
Contact:

Fps and sometimes UPS issues when playing 0.16 (outdated in 0.17)

Post by Steen »

When i play the game sometimes i get a very annoying stutter that is often about 10 seconds long. It feels really random when it happens, but I did made a few pictures of the time usage when it happens. One thing i notice is that the "Flip[on]" takes a lot of time during those fps drops.

I have this problem since 0.16.0, never had it before that.
I do alt-tab alot to go to my second monitor, but before 0.16 that never was an issue
The only mods I run are RSO and ore-eraser which I don't think have any impact on this issue because I've used these mods for quite some time.
I added the save file of the map I use in case you need it.

My graphical settings:
Image

I also don't think my PC specs are the problem here but anyway:

Processor Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz
Video Card NVIDIA GeForce GTX 980
RAM 16 GB

This is the "time usage" tab when everything is running OK:
Image

So the actual issue:

Here you can see that sometimes the fps AND ups drops to around 40 while my base is not large enough by far to dip under 60.
Image

Sometimes it even goes to 30 fps and ups...
Image
Image

It can also happen that the fps dips to 30, but the ups stays at 60.
Image

I will do my best to give more information if needed. I hope it can be fixed, cause it can get quite annoying sometimes.

EDIT: some fixes
Attachments
.Game 4 Megabase 2.zip
(23.51 MiB) Downloaded 170 times

Steen
Burner Inserter
Burner Inserter
Posts: 16
Joined: Wed May 10, 2017 6:12 pm
Contact:

Re: Fps and sometimes UPS issues when playing

Post by Steen »

I noticed something weird, when these fps drops happen factorio uses 100% of my gpu which sounds a little bit strange because the game shouldn't be that harsh on a gtx 980. It even happens when looking at no entities. I do see that zooming in and out makes it fluctuate a lot. when im fully zoomed in the game is using about 20% of my gpu, while having a 100% usage when totally zoomed out (also only capable of playing on 30 fps!)

I also tested this on a new world which is giving exact the same issues (without any entities build!)

I also tried setting the sprite quality to "normal" instead of "high" this gives 0 issues when zoomed out (gpu usage on an empty map only 30% when fully zoomed out).

So my conclusion is that there is something going on with the high resolution terrain (because I did not have this problem in 0.15 and it only happens when zoomed out + on high quality settings)

Loewchen
Global Moderator
Global Moderator
Posts: 8284
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Fps and sometimes UPS issues when playing

Post by Loewchen »

Sounds like: viewtopic.php?f=182&t=54560
Post your log please.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13173
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Fps and sometimes UPS issues when playing

Post by Rseding91 »

It looks like it's spending all of the time trying to flip the display (waiting on vsync).

Try turning vsync off.
If you want to get ahold of me I'm almost always on Discord.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Fps and sometimes UPS issues when playing

Post by orzelek »

Try disabling decoratives - if it starts behaving normally then it's the issue Loewchen linked.

Steen
Burner Inserter
Burner Inserter
Posts: 16
Joined: Wed May 10, 2017 6:12 pm
Contact:

Re: Fps and sometimes UPS issues when playing

Post by Steen »

Rseding91 wrote:It looks like it's spending all of the time trying to flip the display (waiting on vsync).

Try turning vsync off.
Turning vsync of doens't help :/
orzelek wrote:Try disabling decoratives - if it starts behaving normally then it's the issue Loewchen linked.
Will try that soon.

Steen
Burner Inserter
Burner Inserter
Posts: 16
Joined: Wed May 10, 2017 6:12 pm
Contact:

Re: Fps and sometimes UPS issues when playing

Post by Steen »

Tried doing v-sync of one more time, it worked this time!

Twinsen
Factorio Staff
Factorio Staff
Posts: 1329
Joined: Tue Sep 23, 2014 7:10 am
Contact:

Re: Fps and sometimes UPS issues when playing

Post by Twinsen »

This looks like the v-sync plague again!
Image
viewtopic.php?p=192728#p192728

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Fps and sometimes UPS issues when playing

Post by kovarex »

Also, I would make sure that you have full screen and no other programs running, including web browsers, as they eat a lot.

Soullesswaffle
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Jan 05, 2018 9:26 pm
Contact:

Re: Fps and sometimes UPS issues when playing

Post by Soullesswaffle »

I think I was having the same issue.
When I zoomed out, FPS would drop from a solid 60 to around 20.
I noticed that while this happened, flip under frame cycle was taking up around 40 (ms?) instead of the usual < 1.
I tried it with vsync off (which is what I originally had it set to because I use G-SYNC) and with vsync on and there was no difference in performance.

While changing vsync settings and restarting the game to take screenshots for this post, the issue seems to have gone away.
This is what I did, in chronological order:
  • I started with vsync off and I took a screenshot while fully zoomed out (first image in the album)
  • Turned vsync on
  • Restarted the game
  • Took two more screenshots of the issue while vsync was on, one zoomed in and one zoomed out (second and third images)
  • I then realized I forgot to take a screenshot while zoomed in with vsync off, so I:
  • Turned vsync off again
  • Restarted the game
  • Took the screenshot (fourth image)
At this point I noticed the issue had stopped.
I also took a screenshot of my graphics settings afterwards (fifth image).

This seems to match Steen's experience, in that their issue was also resolved after changing vsync settings multiple times.

Hope this helps track down the issue :)

edit: I should mention that at one point while I was taking screenshots, flip wouldn't go below 20 even at minimum zoom level (it still increased when zooming out).
Unfortunately I can't recall whether vsync was on or off when this happened.
Most of the time it was pretty consistent though: flip went from ~0.8 when zoomed all the way in to ~40 when zoomed all the way out (both with vsync on and off).
Attachments
mod-list.json
mod list in case it is relevant
(725 Bytes) Downloaded 159 times
factorio-previous.log
log from previous factorio instance where vsync was on and the issue was still present
(6.2 KiB) Downloaded 161 times
factorio-current.log
log from currently running factorio instance where the issue has been resolved
(6.09 KiB) Downloaded 166 times

Rseding91
Factorio Staff
Factorio Staff
Posts: 13173
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Fps and sometimes UPS issues when playing

Post by Rseding91 »

Soullesswaffle wrote:
At this point I noticed the issue had stopped.
I also took a screenshot of my graphics settings afterwards (fifth image).

This seems to match Steen's experience, in that their issue was also resolved after changing vsync settings multiple times.

Hope this helps track down the issue :)
That just sounds like you forgot to restart the game when you turned vsync off and it was still enabled. That or something in the graphics system didn't disable vsync correctly.

If you have it off consistently does it ever happen (between multiple restarts)?
If you want to get ahold of me I'm almost always on Discord.

IG2
Burner Inserter
Burner Inserter
Posts: 19
Joined: Wed Mar 30, 2016 11:53 pm
Contact:

Re: Fps and sometimes UPS issues when playing

Post by IG2 »

I had the same issue when aving V-Sync ON. Flip[ON] was getting crazy.

Now with V-Sync OFF its seems to be better (at least for the last 15 minutes) but I will reply if i notice something.

Edit1: Just after posting Flip[OFF] stared acting weird again. It went up above 40.


PS: Using GTX 1080 Ti
Last edited by IG2 on Sun Jan 07, 2018 2:35 pm, edited 1 time in total.

Soullesswaffle
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Jan 05, 2018 9:26 pm
Contact:

Re: Fps and sometimes UPS issues when playing

Post by Soullesswaffle »

Rseding91 wrote: That just sounds like you forgot to restart the game when you turned vsync off and it was still enabled. That or something in the graphics system didn't disable vsync correctly.
I can't really comment on the graphics system, but I am 100% sure I restarted the game in between, and it did say flip[off] in the debug view.
The issue I described first started for me after a recent set of updates from the past week or so.
I'm sorry to say I can't recall the exact version numbers, but I do know I didn't experience this issue in 0.16.9.
Rseding91 wrote: If you have it off consistently does it ever happen (between multiple restarts)?
I haven't experienced the issue again since it was resolved in my last post, but I think it might be related to a similar issue I've been having lately.

I've been seeing seemingly random fps drops ever since I started playing Factorio again a few weeks ago (when the 0.16.1 update was out).
Normally I get a constant 60 fps, but every once in a while the fps would drop to 20 and stay there.
The first time this happened I restarted the game and it was fine again, but then after a while it happened again and I alt-tabbed out of the game to Google the issue (I didn't find anything on it).
When I alt-tabbed back into the game, the fps was back to 60. Since then I've experienced many more of these fps drops, and alt-tabbing out and back in to the game always fixes it.
Recently, I've started pressing the Windows key on my keyboard twice to bring up the taskbar and hide it again whenever these drops occur, because this doesn't bring up the whole alt-tab menu while still making the game window lose focus.
For context, I play in (borderless) windowed mode so I can switch between games and other programs more easily.

At first I suspected there was some background program taking up CPU after a while that for some reason stops when the window focus switches (idk), but even after terminating pretty much every process but factorio (and restarting the game), the fps drops still occurred.
Factorio is also the only game I've experienced this issue with, so that makes me think it's Factorio itself, rather than another background process causing the issue.

The last time this happened (just before writing this post), I opened the F5 debug view and took a look at the frame cycle section.
I saw that flip[off] was taking up 40 ms, and after making the window lose focus by pressing the Windows key twice, flip[off] went back down to ~0.5-0.8.
Seeing how flip[off] was the culprit, that makes me think it's somehow related to the issue in my last post.

These fps drops happen regardless of factory size, since I experienced them pretty much from the beginning of my playthrough.
Unlike the issue I described in my first post, this issue always goes away (at least temporarily) when you make the game window lose focus.

I didn't have this issue when I played Factorio before. This was back when alien artifacts were still in the game, so sometime before 0.15.
Not very helpful information, I know. Sorry.

I did manage to capture a video of the issue while I was writing this post, thanks to Shadowplay.
As you can see, the fps drops from 60 to around 15, then stays at 20. flip[off] increases proportionally.
When I then press the Windows key twice, flip[off] drops back down to < 1 and fps is restored to 60.

Update: I recorded a second video of the issue about 10 minutes after writing this post.
This one is at full 3440x1440 resolution and is a bit longer with more context, so you may want to watch it instead.
Attachments
factorio-current.log
The log file from the Factorio instance that was running in the first video
(7.12 KiB) Downloaded 147 times

Acacel
Inserter
Inserter
Posts: 25
Joined: Thu Apr 27, 2017 10:10 pm
Contact:

Re: Fps and sometimes UPS issues when playing

Post by Acacel »

Hello i have a similar problem, in my game i can reproduce it very easy by simply running in one bigger Forest.
in my factory self i have no problem (mapgen set me in a really big dessert, so i found it very late) it runs at 60 fps and 60 ups.

Graphik settings are on default with v-sync off

My map is generated at 0.16.0 and is now on 0.16.15

If needed i can provied the save
Attachments
Debug screen
Debug screen
FPS drop.png (3.16 MiB) Viewed 11766 times

Zavian
Smart Inserter
Smart Inserter
Posts: 1641
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: Fps and sometimes UPS issues when playing

Post by Zavian »

Random thought time. Is factorio using asynchronous draw calls ? Are those flip times just purely the length of time it takes to do a flip, or they they also include finishing any queued draw calls? Could the long flip times be a result of the some sort of graphics card/driver bottleneck, perhaps caused by the graphics driver moving some of the tetures between main memory and vram?

matrixkid29
Burner Inserter
Burner Inserter
Posts: 18
Joined: Sat Jan 14, 2017 5:33 pm
Contact:

Re: Fps and sometimes UPS issues when playing

Post by matrixkid29 »

I'd just like to hop in and say I have what appears to be the same problem. I was about to post and found this first.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13173
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Fps and sometimes UPS issues when playing

Post by Rseding91 »

Zavian wrote:Random thought time. Is factorio using asynchronous draw calls ? Are those flip times just purely the length of time it takes to do a flip, or they they also include finishing any queued draw calls? Could the long flip times be a result of the some sort of graphics card/driver bottleneck, perhaps caused by the graphics driver moving some of the tetures between main memory and vram?
That is what it is. Which is why it hasn't been "fixed". Since from everything we know and have tested over the years we're simply at the limits of what can be drawn with 2D sprites: there are so many high resolution images being drawn each frame from multiple atlases taking up so much VRAM that it maxes something out.

We use sprite batching so when "flip" is called there's nothing on our end waiting to be sent to the graphics card - all of the time spent waiting is inside of the given graphics driver (D3D or OpenGL) - outside of our code.
If you want to get ahold of me I'm almost always on Discord.

Zavian
Smart Inserter
Smart Inserter
Posts: 1641
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: Fps and sometimes UPS issues when playing

Post by Zavian »

Then the solution for many people might be to just turn the sprites down to normal. I know even on my (7 years old) machine with normal res sprite I sometimes see a framerate dip when I walk around near dense forest or there is a lot of items on belt. I assume I am simply hitting the fill-rate cap of my graphics card. But comparing the specs of my old HD 5770 with a GTX 1050 TI, whilst the new card has a higher fill rate, its only got 2-3 times the fill rate, so if HD sprites are twice the resolution (so 4 times the pixels), I'd probably still hit fill rate limits if switched to hi-res sprites and got a new card.

matrixkid29
Burner Inserter
Burner Inserter
Posts: 18
Joined: Sat Jan 14, 2017 5:33 pm
Contact:

Re: Fps and sometimes UPS issues when playing

Post by matrixkid29 »

Then the solution for many people might be to just turn the sprites down to normal
I turned my sprites down to normal and did not see any significant improvements.

However,I might have found a potential solution to OPs problem.

In a failed attempt to find my save game file, I accidentally launched the game from C:/ProgramFiles(x86)/Steam/steamapps/common/Factorio/bin/x64

Along with a faster load time, I have not seen any major ups/fps drops yet.

I'm not computer smart, so I dont know how or why this seems to be helping.

EDIT: I only had success the first time. I have not seen the same results since
Last edited by matrixkid29 on Thu Jan 11, 2018 4:29 pm, edited 1 time in total.

Valeskas
Burner Inserter
Burner Inserter
Posts: 11
Joined: Fri Sep 16, 2016 4:59 pm
Contact:

Re: Fps and sometimes UPS issues when playing

Post by Valeskas »

Setting factorio process priority to High solved the problem for me.
Windows 10
i5 4670 3.4GHz
GTX 1060 6GB
16GB RAM

Dropping UPS to 30 when FPS drops to 30 is a defect that should be fixed IMO.

Post Reply

Return to “Minor issues”