20frame UPS drop after autosave

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
kingarthur
Smart Inserter
Smart Inserter
Posts: 1459
Joined: Sun Jun 15, 2014 11:39 am
Contact:

20frame UPS drop after autosave

Post by kingarthur »

lately in the last several weeks factorio has developed an issue where every time it auto saves my ups drops from 60 down to 40 and after a few seconds it climbs back up to 60. it also does this in random spots as i move around moving into unviewed areas the fist time after map is loaded. ive never had this issue before on this computer.

using the steam version.
latest .16 experimental branch

system specs:
win 10
CPU: i7-4770k at 3.50ghz
500gb ssd
16gb of ram at 1333mhz
graphics: radeon rx 590 with 8gb of ram

task manager show its using 7.9gbs of vram with a map loaded

mods loaded:
all pymods
helmod
creative mode
what is it really used for

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

Re: 20frame UPS drop after autosave

Post by Jap2.0 »

Can you post screenshots with the F4 (debug) option show-time-usage enabled both when you do and don't have the problem?
There are 10 types of people: those who get this joke and those who don't.

kingarthur
Smart Inserter
Smart Inserter
Posts: 1459
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: 20frame UPS drop after autosave

Post by kingarthur »

sorry for the delay. was able to get on my pc till just a bit ago. took a few pics with and without the issue

this is how spoilers are actually notated

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

Re: 20frame UPS drop after autosave

Post by Zavian »

I think I have seen something similar before.

If I understand thing correctly, the actual cause is that that game continues to track update duration during the autosave, so if the autosave takes 5 seconds, then the first update after the autosave is considered to have taken 5 seconds which temporarily drags down the average ups rate for a few seconds after every autosave. If that is the case, your actual performance isn't getting worse, just the average is being temporarily dragged down by the time taken during the autosave.

Also your frame rate, and high vram usage makes me think that not all the graphics are fitting in vram, turning off vsync or lowering graphics settings to normal might improve fps.

kingarthur
Smart Inserter
Smart Inserter
Posts: 1459
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: 20frame UPS drop after autosave

Post by kingarthur »

Zavian wrote:
Tue Jan 22, 2019 4:55 am
I think I have seen something similar before.

If I understand thing correctly, the actual cause is that that game continues to track update duration during the autosave, so if the autosave takes 5 seconds, then the first update after the autosave is considered to have taken 5 seconds which temporarily drags down the average ups rate for a few seconds after every autosave. If that is the case, your actual performance isn't getting worse, just the average is being temporarily dragged down by the time taken during the autosave.

Also your frame rate, and high vram usage makes me think that not all the graphics are fitting in vram, turning off vsync or lowering graphics settings to normal might improve fps.
if i turn vsync off fps goes to 60. i have it on because if its off i get terrible screen tearing that looks like old vcr tracking across my screen when i move probably because i have my pc hooked up to a tv screen. and if that is the case with the ups why did it just start happening now

GrumpyJoe
Filter Inserter
Filter Inserter
Posts: 443
Joined: Fri Apr 06, 2018 7:10 pm
Contact:

Re: 20frame UPS drop after autosave

Post by GrumpyJoe »

kingarthur wrote:
Tue Jan 22, 2019 7:12 am
Zavian wrote:
Tue Jan 22, 2019 4:55 am
I think I have seen something similar before.

If I understand thing correctly, the actual cause is that that game continues to track update duration during the autosave, so if the autosave takes 5 seconds, then the first update after the autosave is considered to have taken 5 seconds which temporarily drags down the average ups rate for a few seconds after every autosave. If that is the case, your actual performance isn't getting worse, just the average is being temporarily dragged down by the time taken during the autosave.

Also your frame rate, and high vram usage makes me think that not all the graphics are fitting in vram, turning off vsync or lowering graphics settings to normal might improve fps.
if i turn vsync off fps goes to 60. i have it on because if its off i get terrible screen tearing that looks like old vcr tracking across my screen when i move probably because i have my pc hooked up to a tv screen. and if that is the case with the ups why did it just start happening now
if i understand it correctly, Zavian talks about time it takes the game to save. Might be that your map got alot bigger? You might not have noticed something like that before, cos saving time was too short to coincidentally do stuff "while" it saves.
I know some things still get processed during the autosave "pause" in which you cannot move. Like if you picked up or placed down something just when autosave hits, iirc also when dragging BPs, some things are "remembered" and executed after the pause (no idea if they would be included in the save tho). So it might be the game "catching up" like on a server

Or does this happen even if you just walked around?

kingarthur
Smart Inserter
Smart Inserter
Posts: 1459
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: 20frame UPS drop after autosave

Post by kingarthur »

Simply walking around. Hell just standing there doing nothing and it happens. I know it's not factory size issue I'm on a relatively new game and I've gotten factory's a lot bigger than where this one is at

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

Re: 20frame UPS drop after autosave

Post by Rseding91 »

Unfortunately, that's how VSYNC works and the reason why I refuse to use it. If *for any reason* it can't render a frame at the correct time it has to wait for the next frame to be available - a full half of w/e rate you where running at - and then continue.

So at 60 FPS if you miss the 16.666~ MS window to render you have to wait another full 16.666~ MS before you can render that frame which takes additional time from the next frame that needs to render in a cascading effect which ends with missing every other frame - or running at 30 FPS when you meant to run at 60.

Based off what you said - I suspect the set of mods you're using has increased the VRAM requirements to run the game beyond the limit that your card can handle while still running the game at 60 FPS. Try changing the graphics resolution setting from "high" to "normal" which should effectively cut the VRAM requirement to 1/4th.
If you want to get ahold of me I'm almost always on Discord.

kingarthur
Smart Inserter
Smart Inserter
Posts: 1459
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: 20frame UPS drop after autosave

Post by kingarthur »

ok so i turned off vsync and i made no other graphics changes and the original issue went away no more weird ups drops and fps/ups is up to 60/60.

now with vsync off the screen tearing comes back with factorio set to full screen. yet go to windowed mode and screen tearing goes away. wtf that doesnt make any sense to me atm.

i guess factorio just needs a borderless windowed mode

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

Re: 20frame UPS drop after autosave

Post by Rseding91 »

kingarthur wrote:
Thu Jan 24, 2019 9:20 am
ok so i turned off vsync and i made no other graphics changes and the original issue went away no more weird ups drops and fps/ups is up to 60/60.

now with vsync off the screen tearing comes back with factorio set to full screen. yet go to windowed mode and screen tearing goes away. wtf that doesnt make any sense to me atm.

i guess factorio just needs a borderless windowed mode
It is borderless windowed mode by default unless you're on an AMD card and or forcing openGL. You can try using --force-d3d.
If you want to get ahold of me I'm almost always on Discord.

kingarthur
Smart Inserter
Smart Inserter
Posts: 1459
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: 20frame UPS drop after autosave

Post by kingarthur »

ok. ya its an amd card. i tried --force-d3d but it its still bordered and spiked ram usage from 2.5gb its using to maxing out all 16gb in the system. idk at this point ive got no ram ups drops and screen tearing is gone so im leave it alone unless somebody wants me to keep messing with things to test it

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

Re: 20frame UPS drop after autosave

Post by Zavian »

Given there are major rendering changes coming with 0.17, my guess is that there is little point in testing this further atm.

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

Re: 20frame UPS drop after autosave

Post by Rseding91 »

kingarthur wrote:
Thu Jan 24, 2019 9:41 am
ok. ya its an amd card. i tried --force-d3d but it its still bordered and spiked ram usage from 2.5gb its using to maxing out all 16gb in the system. idk at this point ive got no ram ups drops and screen tearing is gone so im leave it alone unless somebody wants me to keep messing with things to test it
Do you have some way to reproduce that? Going from 2.5 GB of RAM used to all 16 GB after autosave?
If you want to get ahold of me I'm almost always on Discord.

Serenity
Smart Inserter
Smart Inserter
Posts: 1000
Joined: Fri Apr 15, 2016 6:16 am
Contact:

Re: 20frame UPS drop after autosave

Post by Serenity »

It's possible to use VSync dynamically depending on the framerate. Here for Radeon cards:

https://www.radeonpro.info/features/dyn ... c-control/

kingarthur
Smart Inserter
Smart Inserter
Posts: 1459
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: 20frame UPS drop after autosave

Post by kingarthur »

Rseding91 wrote:
Thu Jan 24, 2019 5:36 pm
kingarthur wrote:
Thu Jan 24, 2019 9:41 am
ok. ya its an amd card. i tried --force-d3d but it its still bordered and spiked ram usage from 2.5gb its using to maxing out all 16gb in the system. idk at this point ive got no ram ups drops and screen tearing is gone so im leave it alone unless somebody wants me to keep messing with things to test it
Do you have some way to reproduce that? Going from 2.5 GB of RAM used to all 16 GB after autosave?
its not autosave. just enabling --force-d3d and loading factorio to the main menu is enough to do it. not even loading a save. i just checked it again

with mods loaded and --force-d3d not used:
ram: 2508mb

with mods loaded and --force-d3d used:
ram: 12568mb

with no mods and --force-d3d not used:
ram: 600mb

with no mods and --force-d3d used:
ram: 3000mb

now this is being monitored by windows task manager

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

Re: 20frame UPS drop after autosave

Post by Rseding91 »

What mods are you using? Can you zip and upload them somewhere?
If you want to get ahold of me I'm almost always on Discord.

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

Re: 20frame UPS drop after autosave

Post by Rseding91 »

Higher RAM usage when using DirectX is expected in 0.16 and older versions due to the game using DX9. It's a trade-off: OpenGL will use less RAM but tends to be 10-20% slower runtime. DirectX uses more RAM but tends to be faster runtime.

However, 10 GB more RAM is crazy and well outside of what's expected. Based off the numbers you gave me it should be: OpenGL with mods: 3 GB, DirectX with mods: 5.5 GB.

In 0.17 we updated our graphics engine and now it uses DirectX 11 (with support for Windows 7) such that the additional RAM usage is gone and now it's just: OpenGL: runs slower - DirectX: runs faster.
If you want to get ahold of me I'm almost always on Discord.

kingarthur
Smart Inserter
Smart Inserter
Posts: 1459
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: 20frame UPS drop after autosave

Post by kingarthur »


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

Re: 20frame UPS drop after autosave

Post by Rseding91 »

For me, on normal resolution graphics it takes 5.5 GB with those mods. With high resolution graphics it takes 7.2 GB.

There's no combination I can manage that uses 12.5 GB.
If you want to get ahold of me I'm almost always on Discord.

kingarthur
Smart Inserter
Smart Inserter
Posts: 1459
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: 20frame UPS drop after autosave

Post by kingarthur »

after i cleaned out all the unused mods from my mods folder it seems to have come down a bit to 9.5gb with --force-d3d on. ive attached some screen shots showing it. would some logs or anything help?
Attachments
factorio ram usage.png
factorio ram usage.png (9.96 MiB) Viewed 2690 times
factorio ram usage 5.png
factorio ram usage 5.png (6.6 MiB) Viewed 2690 times
factorio ram usage 4.png
factorio ram usage 4.png (6.45 MiB) Viewed 2690 times
factorio ram usage 3.png
factorio ram usage 3.png (6.46 MiB) Viewed 2690 times
factorio ram usage 2.png
factorio ram usage 2.png (13.88 MiB) Viewed 2690 times
20190124204205_1.jpg
20190124204205_1.jpg (1.03 MiB) Viewed 2690 times

Post Reply

Return to “Technical Help”