[CODE]Server frame time checker (Thanks to jonwil!) [message #492322] |
Sat, 29 April 2017 05:57 |
iRANian
Messages: 4308 Registered: April 2011
Karma: 0
|
General (4 Stars) |
|
|
Thanks to Jonwil for suggesting this method and the RealFrameSeconds variable to use.
This will display a Frame Time warning in the console if the frametime is higher or equal to 12 milliseconds. If the server is set to 100 sfps than the normal frame time is 10 ms. If the SFPS is 60 than its 16.6667ms etc.
If server suffers from frame time stutters a lot of really annoying lag occurs...when jumping your jumps are random interrupted and/or will warp you around. Movement will warp around, and enemy infantry unit movement will stutter so if you're aiming (for head shot) you will miss.
Servers like MPF and RenCorner suffer heavily from that. Both servers will drop to 99 sfps (from 100 sfps a bit). The ingame SFPS counter averages over one second (so if sfps is 100..it will be 100 frames), this makes it look like it's not that much of an issue as it's just one or two SFPS that are lower...but in actuality those server FPS drops come from one frame taking more than 40 milliseconds...causing very noticable stutter.
REF_DEF2(float, RealFrameSeconds, 0x00857294, 0x0085647C);
uint32 LastInterval = 0;
int FrameTimesIndex = 0;
float WorstTime = 0;
uint32 CurrentUpdateTime = 0;
void Main_Hooks::Think() {
CurrentUpdateTime = TIMEGETTIME();
// check every second
if ((CurrentUpdateTime - LastInterval) >= 1000)
{
LastInterval = CurrentUpdateTime;
// output only if frame is more than or equal to 12 milliseconds
if (WorstTime*1000 >= 12.f) {
Console_Output("[FrameTime] Worst frametime last second: %3.3fms\n", WorstTime*1000);
}
WorstTime = 0;
}
WorstTime = max(WorstTime, RealFrameSeconds);
}
Long time and well respected Renegade community member, programmer, modder and tester.
Scripts 4.0 private beta tester since May 2011.
My Renegade server plugins releases
[Updated on: Sat, 29 April 2017 06:01] Report message to a moderator
|
|
|
|
|
Re: [CODE]Server frame time checker (Thanks to jonwil!) [message #492340 is a reply to message #492322] |
Sun, 30 April 2017 16:33 |
dblaney1
Messages: 358 Registered: March 2014 Location: United States
Karma: 0
|
Commander |
|
|
The best SFPS to set is actually setting it to 58 (the int casting makes this number off) in the config. This makes it come out 59/60 fps per second. It also gives you the full 30 net_updates per second at evenly spaced intervals. The way the net_update code works if that at 100 sfps it won't actually run 30 times because it does 1/30 seconds and checks if the amount of time since the last update is greater. So at 100 sfps it won't be greater than that until 4 frames in which is 4/100 seconds. That means at 100 sfps you are only getting 25 updates per second. At 59/60 sfps which also happens to be the rate most monitors refresh at you get the full 30 because it will do every other frame. This also makes them consistently spaced out. Some things with physics also don't work the same when going over 60fps.
[Updated on: Sun, 30 April 2017 16:57] Report message to a moderator
|
|
|
Re: [CODE]Server frame time checker (Thanks to jonwil!) [message #492341 is a reply to message #492322] |
Mon, 01 May 2017 04:42 |
iRANian
Messages: 4308 Registered: April 2011
Karma: 0
|
General (4 Stars) |
|
|
I think on RenCorner the server NUR is set lower than 30 anyhow. Maybe someone can confirm this cause I was talking to one of their admins about it like 2 weeks ago and I vaguely recall him mentioning how server NUR wasn't really helping much for them other than increasing server and client bandwidth usage.
On my test server I have it set to 50 NUR with 100 SFPS and 1000 client NUR and it fixes the crouching lag. That test build fixed the jumping lag.
I and ExEric tried 60 sfps with 30 server NUR and we'd still get lag, at around 50-60 server NUR it stops getting better quality wise. The main issue we noticed is vehicle lag when getting in and out and with movement...probably because infantry movement is mostly client-side now and at a very high update rate with 1000 NUR.
I've tested the 1000 client NUR (with the 4.4 test build with jump lag fix) on empty US servers and I can confirm this fixes all the lag on your infantry unit as long as the server has no frame time issues.
If the server has frame time issues your jumps get 'cancelled' in mid air and you warp all over the place...enemy infantry start stuttering like crazy.
I haven't tested this really but I also think that if an enemy player has 1000 client nur...his movement is smoother and he's easier to hit. ExEric was running 1000 client NUR on our Euro test server and he's easier to hit than other Euro players with 10-30 client NUR.
Note that I and ExEric tested it with 50 players (joining with +multi clients) and the frame time chceker showed that the frame time kept below 12 ms....and all the lag was still fixed with client nur 1000 and that test scripts build. So as long as frame time is good the lag doesn't increase.
Long time and well respected Renegade community member, programmer, modder and tester.
Scripts 4.0 private beta tester since May 2011.
My Renegade server plugins releases
[Updated on: Mon, 01 May 2017 04:45] Report message to a moderator
|
|
|
|
|
Re: [CODE]Server frame time checker (Thanks to jonwil!) [message #492345 is a reply to message #492322] |
Mon, 01 May 2017 10:15 |
dblaney1
Messages: 358 Registered: March 2014 Location: United States
Karma: 0
|
Commander |
|
|
The server side NUR doesn't need to go above 30 updates per second. Its just the client side nur (command rate me and saberhawk have been calling it to distinguish it from server to client net update rate). Vehicle lag in the latest bandtest works just fine at 30 updates per second. I found that setting it to 35 comes out to the best as it adds a bit of padding to the incase a frame ends up slightly fast which at the default sfps (comes out to 62-63) it does. This makes the server send out updates every other frame. With the default 30 it ends up being every 3rd frame and comes out to 20-21 updates per second.
I have had great sucess with a command rate (client to server) set to 75 which with vsync on comes out to exact one client to server update per frame. It has minimal bandwidth increase but drastically improves latency and sliding.
[Updated on: Mon, 01 May 2017 10:24] Report message to a moderator
|
|
|
Re: [CODE]Server frame time checker (Thanks to jonwil!) [message #492346 is a reply to message #492322] |
Mon, 01 May 2017 10:20 |
iRANian
Messages: 4308 Registered: April 2011
Karma: 0
|
General (4 Stars) |
|
|
Settings SFPS to 60 compared to 100 increases jumping lag when not running that jump lag fix test build of 4.4.
ExEric and I tested it today.
ExEric and I didn't notice much different between server NUR 50 and 60. But NUR 50 with 100 sfps is divisble to a whole number so the update rate will be constant if there are no frame time issues.
Long time and well respected Renegade community member, programmer, modder and tester.
Scripts 4.0 private beta tester since May 2011.
My Renegade server plugins releases
|
|
|
|
|
|
Re: [CODE]Server frame time checker (Thanks to jonwil!) [message #492351 is a reply to message #492322] |
Mon, 01 May 2017 10:37 |
iRANian
Messages: 4308 Registered: April 2011
Karma: 0
|
General (4 Stars) |
|
|
btw off-topic but is it possible to have a seperate mine and remote c4 limit...when proxy c4 and remote c4 are seperated they still make use of the same mlimit command to check how many of a remote and proxy c4 are needed. You can't say "50 proxies mine limit and 200 remote c4 limit".
I bypassed this by setting mine limit to 999 and implementing my own mine and remote c4 limit logic and then overwritten mlimit console command for the proxy c4 limit.
Long time and well respected Renegade community member, programmer, modder and tester.
Scripts 4.0 private beta tester since May 2011.
My Renegade server plugins releases
|
|
|
|
|
|
|
|
|
|