Windows 10 performance increasing routine causing desyncs in MP

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.
Post Reply
Lucasuper
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Aug 31, 2020 5:25 pm
Contact:

Windows 10 performance increasing routine causing desyncs in MP

Post by Lucasuper »

The title should sum up my problem. When I am playing in multiplayer, and especially in heavily modified scenarios where lots of entities need to be updated each frame, the game tends to very quickly desync with the server but ONLY when I send the game to the background, usually alt-tabbing to use the browser. When I had previously used Windows 7, I had no issues. The game runs perfectly fine otherwise.

This makes me suspect that a certain Windows 10 feature that is meant to save power or increase performance is interfering with the game receiving and actualizing updates from the server but not completely stopping it.

I have not encountered similar issues with any other multiplayer games. I have tried running the game as admin.

Any opinion on how to solve this is appreciated.

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

Re: Windows 10 performance increasing routine causing desyncs in MP

Post by Rseding91 »

The issue is going to be with the mod(s) you're using. The game logic doesn't care what operating system you're running on or what the operating system is doing it all runs the same. Fast or slow, windows vista, 7, 8, 10, linux, mac - it's all the same to the code.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Jon8RFC
Filter Inserter
Filter Inserter
Posts: 553
Joined: Tue May 10, 2016 3:39 pm
Contact:

Re: Windows 10 performance increasing routine causing desyncs in MP

Post by Jon8RFC »

You can try launching the game with a higher priority. Create a shortcut and in the target field, put this (adjusted to your installation location):
C:\Windows\System32\cmd.exe /c start "Factorio" /abovenormal "C:\Program Files\Factorio\bin\x64\factorio.exe"

But, what Windows does is exactly what you're describing. The burden is not on Factorio, it's on how Windows is designed to operate and how you're choosing to use Windows. Windows gives priority to a fullscreen application in the foreground. When you take away the fullscreen window from the foreground, Windows effectively goes "ok, that isn't a priority".
Also, it's more of a reason not to run any video game in windowed fullscreen (unless you have some weird mouse issue which is only solved by doing this), because it won't give that foreground window the higher priority as if it was actually fullscreen. It treats your windowed fullscreen game exactly the same as the browser in the background. Bad idea for performance to not run true fullscreen in Windows.
Image

gabberworld
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Sat Aug 17, 2019 11:06 pm
Contact:

Re: Windows 10 performance increasing routine causing desyncs in MP

Post by gabberworld »

they can make in code that factorio have higest priority all the time, unless if they not made that already
you can also manualy made that in taskmanager

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

Re: Windows 10 performance increasing routine causing desyncs in MP

Post by Jap2.0 »

gabberworld wrote:
Tue Sep 01, 2020 12:44 am
they can make in code that factorio have higest priority all the time, unless if they not made that already
you can also manualy made that in taskmanager
Setting your program to be the highest priority without any user input is kind of bad etiquette because it can negatively affect system responsiveness; if it's the only thing running, the OS should give it nearly all processing time anyway.
There are 10 types of people: those who get this joke and those who don't.

gabberworld
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Sat Aug 17, 2019 11:06 pm
Contact:

Re: Windows 10 performance increasing routine causing desyncs in MP

Post by gabberworld »

Jap2.0 wrote:
Tue Sep 01, 2020 2:22 am
gabberworld wrote:
Tue Sep 01, 2020 12:44 am
they can make in code that factorio have higest priority all the time, unless if they not made that already
you can also manualy made that in taskmanager
Setting your program to be the highest priority without any user input is kind of bad etiquette because it can negatively affect system responsiveness; if it's the only thing running, the OS should give it nearly all processing time anyway.
and thats why they set it to normal, then noone complains

basically user can todo that self if he see that he needed

but there are cases when its better if its higer than normal, for example if you run app as server

Lucasuper
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Aug 31, 2020 5:25 pm
Contact:

Re: Windows 10 performance increasing routine causing desyncs in MP

Post by Lucasuper »

Rseding91 wrote:
Mon Aug 31, 2020 9:10 pm
The issue is going to be with the mod(s) you're using.
It is not the mods interfering with the OS. It is the OS which is interfering with Factorio. The proof is that the game desyncs in pure un-scripted vanilla too. And I was not talking about mods either, I meant scripted scenarios.

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

Re: Windows 10 performance increasing routine causing desyncs in MP

Post by Rseding91 »

Lucasuper wrote:
Fri Sep 04, 2020 3:18 pm
Rseding91 wrote:
Mon Aug 31, 2020 9:10 pm
The issue is going to be with the mod(s) you're using.
It is not the mods interfering with the OS. It is the OS which is interfering with Factorio. The proof is that the game desyncs in pure un-scripted vanilla too. And I was not talking about mods either, I meant scripted scenarios.
I doubt it. I would need to see the desync report that gets generated to tell you if it's a game code issue or if really the operating system is changing CPU behavior (I HIGHLY doubt that's the case).
If you want to get ahold of me I'm almost always on Discord.

Lucasuper
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Aug 31, 2020 5:25 pm
Contact:

Re: Windows 10 performance increasing routine causing desyncs in MP

Post by Lucasuper »

Jon8RFC wrote:
Mon Aug 31, 2020 10:00 pm
You can try launching the game with a higher priority.
This worked in a certain sense. The true issue was with a certain Xbox Game Overlay that runs with the game and is much clunkier than, for example, discord's game overlay, since it includes many features such as compressed VR and SR in multiple streams and god knows what else. When the overlay starts with the same priority setting as the game it seems to create some kind of deadlock in the memory allocation for the respective entity updating processes that doesn't actualize until one shifts the window out of focus.

I figured this out when I first increased the priority setting of factorio, which caused the overlay to crash when starting the game. Factorio runs fine now at a normal priority setting since I disabled the overlay.

Taking into account that the overlay belongs to an older version of Windows 10, and thus might have already been patched, no other people should encounter this issue.

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

Re: Windows 10 performance increasing routine causing desyncs in MP

Post by Rseding91 »

Lucasuper wrote:
Mon Aug 31, 2020 5:45 pm
... the game tends to very quickly desync with the server...
Can you describe exactly what you mean by this? "desync" is a very specific error condition the happens in the game and I suspect you're using it to mean something else.

Are you getting this error prompt?
Capture.PNG
Capture.PNG (90.44 KiB) Viewed 2512 times
If you want to get ahold of me I'm almost always on Discord.

Lucasuper
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Aug 31, 2020 5:25 pm
Contact:

Re: Windows 10 performance increasing routine causing desyncs in MP

Post by Lucasuper »

[/quote]
if really the operating system is changing CPU behavior
[/quote]

Resource management is one of the main tasks of the OS, why is it soo surprising?

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

Re: Windows 10 performance increasing routine causing desyncs in MP

Post by Rseding91 »

Lucasuper wrote:
Fri Sep 04, 2020 3:51 pm
if really the operating system is changing CPU behavior
Resource management is one of the main tasks of the OS, why is it soo surprising?
Because that goes directly against what the OS wants: stability and reliability. If it just arbitrarily changed how code is going to run to different results that breaks every single bit of how programs are expected to run and would quickly cause everyone to stop using that OS.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Jon8RFC
Filter Inserter
Filter Inserter
Posts: 553
Joined: Tue May 10, 2016 3:39 pm
Contact:

Re: Windows 10 performance increasing routine causing desyncs in MP

Post by Jon8RFC »

Uh oh! Let me clarify "Windows does exactly what you're describing..."
Windows doesn't desync factorio or crash applications when priority changes. That makes no sense, but some may have inferred my statement in that way. Windows absolutely lowers priority when you alt+tab, and then performance drops.

Changing if factorio is "no longer prioritized" when you alt+tab on a heavy-duty multiplayer map can mitigate performance problems. I wouldn't get stuck with 5fps and having to wait and as often when I'd alt+tab. It's certainly an excellent move for troubleshooting to eliminate variables since priority changing is exactly what happens when you alt+tab away.

But...

The priority just changes...the priority...and I HIGHLY doubt that the priority itself inherently causes a desync equally as much as I doubt that it causes notepad to crash.
Image

Post Reply

Return to “Technical Help”