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.
AndrewIRL
Fast Inserter
Fast Inserter
Posts: 240
Joined: Fri Mar 24, 2017 2:17 pm
Contact:

Re: Fps and sometimes UPS issues when playing

Post by AndrewIRL »

Steen wrote:Processor Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz
Video Card NVIDIA GeForce GTX 980
RAM 16 GB
Well that's weird. I have the exact same specs as OP ... and the same problem with 0.16.16 mostly 60fps with strange extended periods at 30fps before recovering. According to show-time-usage all the mods I have are well behaved with Bottleneck showing 0.3/0.029/2.033 presumably current/min/max milliseconds.

My problem seemed to be Flip[on] which was hitting ~30ms with a minimum around 16ms.

But now with 0.16.18 there are no smooth 60fps periods at all, just stuck at 30fps constantly. Standing still in the desert fully zoomed in.

Flip[on]: 28.5/24.992/30.087 (0.16.18)

This is different from yesterday to today and I made no other changes.

I play fullscreen (4K screen) but have a web browser open 100% of the time on a second screen every time I've ever played.

Turned vsync off and now I see:
Flip[off]: 0.695/0.514/0.923 (0.16.18)
and 60fps (not solid, flashes to 59.9 a lot)

I never tried vsync off with 0.16.16 so I don't know what would have happened. Observationally I had noticed that on 0.16.16 the custom GUI scaling of 200% seemed to have more 30fps problems than a GUI scaling of 150% and I was going to do some measurements to see if this was real or illusory before reporting on the forums but 0.16.18 came out and changed things dramatically.

I see
Sleep: 11.7/8.1/13.5
I assume this means minimum sleep of 8.1ms and maximum sleep of 13.5ms so for a 16.6ms frame half or more of the time is spent sleeping? :lol: So my base is too small and I need to work harder and make it bigger?! :o

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: Fps and sometimes UPS issues when playing

Post by Jap2.0 »

AndrewIRL wrote:
Steen wrote:Processor Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz
Video Card NVIDIA GeForce GTX 980
RAM 16 GB
Well that's weird. I have the exact same specs as OP ... and the same problem with 0.16.16 mostly 60fps with strange extended periods at 30fps before recovering. According to show-time-usage all the mods I have are well behaved with Bottleneck showing 0.3/0.029/2.033 presumably current/min/max milliseconds.

My problem seemed to be Flip[on] which was hitting ~30ms with a minimum around 16ms.

But now with 0.16.18 there are no smooth 60fps periods at all, just stuck at 30fps constantly. Standing still in the desert fully zoomed in.

Flip[on]: 28.5/24.992/30.087 (0.16.18)

This is different from yesterday to today and I made no other changes.

I play fullscreen (4K screen) but have a web browser open 100% of the time on a second screen every time I've ever played.

Turned vsync off and now I see:
Flip[off]: 0.695/0.514/0.923 (0.16.18)
and 60fps (not solid, flashes to 59.9 a lot)

I never tried vsync off with 0.16.16 so I don't know what would have happened. Observationally I had noticed that on 0.16.16 the custom GUI scaling of 200% seemed to have more 30fps problems than a GUI scaling of 150% and I was going to do some measurements to see if this was real or illusory before reporting on the forums but 0.16.18 came out and changed things dramatically.

I see
Sleep: 11.7/8.1/13.5
I assume this means minimum sleep of 8.1ms and maximum sleep of 13.5ms so for a 16.6ms frame half or more of the time is spent sleeping? :lol: So my base is too small and I need to work harder and make it bigger?! :o
I think that vsync forces it to 30 or 60 fps - so if you're at 59.9 fps, it will force it down to 30.
There are 10 types of people: those who get this joke and those who don't.

AndrewIRL
Fast Inserter
Fast Inserter
Posts: 240
Joined: Fri Mar 24, 2017 2:17 pm
Contact:

Re: Fps and sometimes UPS issues when playing

Post by AndrewIRL »

Jap2.0 wrote:
AndrewIRL wrote:Turned vsync off and now I see:
Flip[off]: 0.695/0.514/0.923 (0.16.18)
and 60fps (not solid, flashes to 59.9 a lot)
...
I see
Sleep: 11.7/8.1/13.5
I assume this means minimum sleep of 8.1ms and maximum sleep of 13.5ms
I think that vsync forces it to 30 or 60 fps - so if you're at 59.9 fps, it will force it down to 30.
So you are saying the sleep is a couple hundredths of a millisecond too long and that's causing framerate to fall below 60 and thus vsync is locking it at 30fps? If a frame takes 16.667 ms then I get 59.9988fps but if it takes 16.666 then it's 60.0024fps. So if the sleep calculation is consistently off and sleeps too long by 0.001ms then I hit the dreaded vsync bug? To get a perfect 60fps the sleep has to be managed such that 40 frames are 16.667 and 20 frames are 16.666? (20*16.666+40*16.667=1000) The sensitivity is such that it has to be precise to the microsecond?

I'm not clear on how sending frames to the GPU works as I am not a game developer so this is all wild speculation.

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: Fps and sometimes UPS issues when playing

Post by Jap2.0 »

AndrewIRL wrote:
Jap2.0 wrote:
AndrewIRL wrote:Turned vsync off and now I see:
Flip[off]: 0.695/0.514/0.923 (0.16.18)
and 60fps (not solid, flashes to 59.9 a lot)
...
I see
Sleep: 11.7/8.1/13.5
I assume this means minimum sleep of 8.1ms and maximum sleep of 13.5ms
I think that vsync forces it to 30 or 60 fps - so if you're at 59.9 fps, it will force it down to 30.
So you are saying the sleep is a couple hundredths of a millisecond too long and that's causing framerate to fall below 60 and thus vsync is locking it at 30fps? If a frame takes 16.667 ms then I get 59.9988fps but if it takes 16.666 then it's 60.0024fps. So if the sleep calculation is consistently off and sleeps too long by 0.001ms then I hit the dreaded vsync bug? To get a perfect 60fps the sleep has to be managed such that 40 frames are 16.667 and 20 frames are 16.666? (20*16.666+40*16.667=1000) The sensitivity is such that it has to be precise to the microsecond?

I'm not clear on how sending frames to the GPU works as I am not a game developer so this is all wild speculation.
I have no idea either.
There are 10 types of people: those who get this joke and those who don't.

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

Re: Fps and sometimes UPS issues when playing

Post by Rseding91 »

From all of the different posts here this looks to be what it has always been except exacerbated with the addition of more high res textures in 0.16.

As of now, lowering graphics quality from high res to normal or turning vsync off may help. But we have no other ideas on this at the moment. It may be better in 0.17 with the graphics API re-write and update but until then I'm going to move this (for lack of a better location) minor issues.
If you want to get ahold of me I'm almost always on Discord.

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Fps and sometimes UPS issues when playing

Post by posila »

In addition what Rseding said, you can also try to change Atlas texture size and/or change Video memory usage to High. It seems to help to some people.
Keep v-sync off unless it works better for you with it on ... You won't have tearing as the game is either windowed or borderless fullscreen, so desktop compositor will v-sync it to screen anyway (unless you have Windows 7 and turned off Aero)

User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

Re: Fps and sometimes UPS issues when playing

Post by impetus maximus »

i know this is a sensitive subject. hope Twinsen isn't reading this.
Image

i disable v-sync in the game and use Aero theme in win7 for v-sync.
seems to work windowed, and full screen.

AndrewIRL
Fast Inserter
Fast Inserter
Posts: 240
Joined: Fri Mar 24, 2017 2:17 pm
Contact:

Re: Fps and sometimes UPS issues when playing

Post by AndrewIRL »

posila wrote:You won't have tearing as the game is either windowed or borderless fullscreen, so desktop compositor will v-sync it to screen anyway (unless you have Windows 7 and turned off Aero)
The drops to 30fps are very noticeable and make the game feel poorly optimized/slow/low quality/indie. For the average player to figure out the problem they need to:

Know that the forums exist. Understand what FPS is. Believe that the FPS issue is solvable. Search the forums for FPS issues, read this thread and take action.

Overall I would guess (no evidence) that the number of people affected by the issue is vastly larger than the number of the people who will read this thread and address it. Others will simply tell their friends Factorio is OK but runs slowly, even on a GTX980 and i7.

To smooth the user experience I suggest:
1) Automatically detect that this is happening: signature might be some combination of FPS/Flip[on]/sleep
2) Put a message on the screen saying: "It looks like you are suffering FPS issues, possibly associated with Vsync, click here to turn it off. Note: You won't have tearing if the game is either windowed or borderless fullscreen as desktop compositor will v-sync for you"
3) Offer a further option: "Report this to the Factorio team, this sends your GPU, driver version, CPU, OS etc details to us"

This suggestion is predicated on the assumption that there is a way to do (1) with a high level of accuracy.


Alternately simply turn off v-sync if you detect windowed or borderless fullscreen and Windows 10. If it has no value in this circumstance but can cause problems it is a net negative.

User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

Re: Fps and sometimes UPS issues when playing

Post by impetus maximus »

if you are using nvidia graphics, disable g-sync. also make sure it set to 'maximum performance' in nvidia control panel.

Immun
Inserter
Inserter
Posts: 24
Joined: Mon Apr 24, 2017 7:24 pm
Contact:

Re: Fps and sometimes UPS issues when playing

Post by Immun »

i don't know if this is solved and related to the same issue but for me helped to enable [Separate lower object atlas]. no idea in which version this option came in (running today when discovered on 16.26 but had the problem before as well).
by default i guess it is switched off. i can't remember to change here values since ever except video memory usage and sprite resolution.
27-02-2018 01-25-16.jpg
27-02-2018 01-25-16.jpg (60.72 KiB) Viewed 6280 times
perhaps some hints to the devs where the problem could be:
GTX960 chews up full GPU when in map zoom (only on zoom level where you still can see details and one level more in) and only when i have in the screen the following texture (the green plants). not on forests as far as i can tell. deserts are not affected at all (no green stuff :D )
27-02-2018 01-23-25.jpg
27-02-2018 01-23-25.jpg (137.53 KiB) Viewed 6280 times

User avatar
TruePikachu
Filter Inserter
Filter Inserter
Posts: 978
Joined: Sat Apr 09, 2016 8:39 pm
Contact:

Re: Fps and sometimes UPS issues when playing

Post by TruePikachu »

I'm also getting very bad FPS in the map view in certain unknown conditions. For instance, I made a heavily-fortified artillery cannon assembly using a slightly-modified Creative Mode mod (in order to mess around with the artillery cannons), and while I got 60FPS/60UPS when zoomed out not in the map view, it dropped to 10FPS/52UPS when I viewed it in the map, even when zoomed further in. Checking the debug overlay, Flip[on] was ~1.5ms outside the map view, but a whopping 68.3 ms inside the map view.

I have no way to verify it, but my first suspicion is that there might be a problem in the shader that handles making the map view grainy. Perhaps it would be an idea to add a debug option to allow disabling the map grain shader, at least to check if it is at all related to the issue.

Might it be an idea to disable Factorio's v-sync and instead use AMD's forced v-sync? I can't completly disable it because of tearing issues (Win7 non-Aero).
Log header

YunoAloe
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Tue Mar 12, 2019 9:22 pm
Contact:

Re: Fps and sometimes UPS issues when playing

Post by YunoAloe »

This topic is the top result for all searches related to fps/ups troubleshooting. What helped for me to get rid of stuttering, strangely enough was enabling texture compression (high, v0.17.17). I have Xeon W-2125, 64Gb ECC RAM, RTX 2080Ti 11Gb, SSD. Resource monitor showed only about 8 Gb of Vram used, and about 12 Gb RAM. No debug output pointed to any GPU-related problems. Why would GPU influence UPS anyway? So I tried some options but only this worked, and worked perfectly as I completely always have 60 FPS/UPS now. Vram & RAM usage got reduced about 5-10 times. Maybe I should have looked into resource monitor dynamics more, but there's no more need to. I've recorded my stuttering with debug on a video, but it doesn't want to get attached here and I'm rather lazy to upload it anywhere else, but could do if anyone needs this. I also noticed that both the OP and someone on this second page have their texture compression off.
Last edited by YunoAloe on Mon Mar 25, 2019 4:46 am, edited 1 time in total.

User avatar
BlueTemplar
Smart Inserter
Smart Inserter
Posts: 2420
Joined: Fri Jun 08, 2018 2:16 pm
Contact:

Re: Fps and sometimes UPS issues when playing

Post by BlueTemplar »

This thread was started for issues with 0.16.
First, the graphics engine has completely changed from 0.16 to 0.17.
Then, if I'm not mistaken, unlike in 0.16, texture compression is ON by default, (and works in a completely different way?) with high quality texture compression being the default for any but the weakest GPU's :
https://factorio.com/blog/post/fff-281
Image
You ask why GPU would influence UPS, but then say that it's actually FPS that was an issue ?
BobDiggity (mod-scenario-pack)

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

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

Post by posila »

I strongly recommend to keep texture compression enabled in 0.17.

Other than that, v-sync seems to cause performance issues in 0.17, so if your FPS is dropping and dragging UPS down with it, try to disable v-sync.

TRauMa
Inserter
Inserter
Posts: 40
Joined: Fri Jan 15, 2016 3:48 pm
Contact:

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

Post by TRauMa »

Just for the record, I had this problem in 0.17 with an R9 285 under Linux (amdgpu/radeonsi drivers), and setting memory usage to high (from full) fixed it for me.

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

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

Post by Rseding91 »

TRauMa wrote:
Fri Apr 05, 2019 6:32 pm
Just for the record, I had this problem in 0.17 with an R9 285 under Linux (amdgpu/radeonsi drivers), and setting memory usage to high (from full) fixed it for me.
A quick google search says that card has 2 GB of VRAM - so using "all" VRAM and high resolution sprites should never even work. Not surprising you had performance issues with it.
If you want to get ahold of me I'm almost always on Discord.

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

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

Post by posila »

Rseding91 wrote:
Sat Apr 06, 2019 12:48 pm
A quick google search says that card has 2 GB of VRAM - so using "all" VRAM and high resolution sprites should never even work. Not surprising you had performance issues with it.
In 0.17, 2GB should be enough as long as texture compression is enabled and there is no other application using lots of VRAM running.

TRauMa
Inserter
Inserter
Posts: 40
Joined: Fri Jan 15, 2016 3:48 pm
Contact:

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

Post by TRauMa »

Yep, even works with mods that add animations and stuff! The occasional stutter is still there, but as long as I get gorgeous detailed gfx it's a trade off I'm fine with.

Top down view, for me, makes always smooth fps less important than high detail in what I'm looking at, and from what I gather from the forums of other games that's a common sentiment. With first person, I'll much more readily sacrifice fidelity for smoothness.

Twenty4boy
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Jan 08, 2018 3:17 pm
Contact:

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

Post by Twenty4boy »

I've been having these exact issues for a while now. Ups and Fps dropping to 30 and back up. Over and over. Thought it was my hard drive possibly my cpu. I tried the suggestions in this topic. To turn off V-sync. Works fantabulous. Haven't had a drop since. Watching closely the worst Fps i have now is 58 but the base i have is running 6k science per min. So no complaints. Thanks for the post. Version I'm running as of my post is 18.21.

Post Reply

Return to “Minor issues”