Page 1 of 1

Ability to show UPS of the server

Posted: Fri May 15, 2020 9:08 pm
by Kalixt
Hello,

it would be nice to have checkbox like many others in F4 / debug mode to show UPS of the server. It is possible to implement something like this ? I've read topics that UPS which is displayed on client side is always related to what client machine is able to handle so if client have 60 UPS, server can still run at 48 for instance.

source: https://www.reddit.com/r/factorio/comme ... erver_ups/

Re: Ability to show UPS of the server

Posted: Fri May 15, 2020 9:51 pm
by ssilk
As they say in the Reddit: the game runs synchronized, every instance has the same update rate, it’s a basic principle.

Re: Ability to show UPS of the server

Posted: Fri May 15, 2020 10:18 pm
by Kalixt
yes, thats true but displayed UPS shows 60 if your PC is faster than server but game runs slower. I want to see real UPS of the server not teoretical options of my machine.

Re: Ability to show UPS of the server

Posted: Fri May 15, 2020 11:14 pm
by quyxkh
Do you mean you want to see how fast you're catching up when you first connect? If your rig can run a map at 62UPS running flat-out and the server's doing the usual 60 it might take a long time to catch up to a really big map, iirc the client shows the catch-up speed (the made-up 62 here) until it's caught up, after that everything shows the same.

Re: Ability to show UPS of the server

Posted: Fri May 15, 2020 11:21 pm
by Kalixt
Nope, it has nothing to do with catching up, when I connect to server my movement is slower, items on belts move slower, everyting feels like it runs below 60 UPS although it shows 60 UPS. When I save the map from server and run it locally on my machine, speed is fine, everything moves as it should at 60 UPS.

Re: Ability to show UPS of the server

Posted: Fri May 15, 2020 11:56 pm
by Loewchen
In multiplayer all clients are switching between two versions of the game, the latency free local one, and the one decided by the synchronised user inputs sent from the server.
The debug display shows the local update rate, OP wants wants to know the resulting rate after waiting for the server to tell the clients what inputs are actually to be considered for those locally precalculated ticks.

Re: Ability to show UPS of the server

Posted: Sat May 16, 2020 9:21 pm
by Kalixt
Yes, thank you Loewchen.

It can by pretty easily reproduced, run end game base on weak CPU used for most of the VPS cloud servers for instance (around 1.3 Ghz). It will show 60 UPS if you connect with good enough CPU but game speed will be somewhere around (0.4) of the normalne game speed.

I want to know this mainly because I run my own server on older hardware and lately it becomes significantly slower than before and I would like to know how much UPS I can gain back based on actions to reduce UPS sensitive parts of the base.

Re: Ability to show UPS of the server

Posted: Sun May 17, 2020 6:55 am
by ssilk
So what you want to know is the REAL update per second. I even didn’t know that this is calculated differently (always thought it is based on real-time).

Hm, the most simple solution I can think of is this: make a counter (just an arithmetic combinator which adds 1 to the input signal and connect input with output), add another arithmetic combinator which divides that by 60. Now measure he seconds in game and the real world seconds for 1 minute or longer. Now divide the delta of game-seconds by the delta of real-world seconds and you get the factor how fast the game really is.

Re: Ability to show UPS of the server

Posted: Sun May 17, 2020 10:03 am
by Koub
It is indeed possible to set up an absolutely convoluted workaround to try and calculate server UPS. However, I agree with OP that it should be displayable without a PhD in combinator setups, as it has no gameplay value to expect players to build such a contraption just to have an insight on how the map runs on the server.

Re: Ability to show UPS of the server

Posted: Tue May 19, 2020 3:24 am
by morsk
This feature is needed to counter widespread misunderstanding. I've seen admins of major multiplayer maps not understand that the server is below 60 UPS. This month, I saw an IT professional recommend running Factorio as a server to improve UPS, because he believed he was getting 60 UPS in multiplayer. Everyone is wrong about it the first time, because it's so counter-intuitive.

Just to explain exactly how this happens... multiplayer has updates that aren't ticks. If the client updates before the server, it ends the update immediately, to avoid getting ahead of the server. You will be able to see in the time statistics, that some updates are only 0.001 ms long. The client still considers them "updates" and thinks it's getting 60 UPS.

To compound the confusion, the "Game update" time in the statistics is an average. So if your 20ms updates are mixed with 0ms "updates", the average is going to be below 16.6ms, and you can think "Of course I'm getting 60 UPS. The updates are only 12ms!!" But even this is untrue. (I'm not suggesting changing the debug screens, only saying they don't help; nothing helps.)