- snaps and sv_fps does NOT produce lag because you can still do actions meanwhile and they are taken into account.
A question. The server of The Geez, despite having a huge internet connection (60/11 Mbps) had clients lagging (he saw connection icon over their head), that diminished when he lowered his sv_maxfps (that was set to the high value of 100). Exactly, how can sv_maxfps increase players lag? Is it possible that his enormous bandwidth ended? Even with the rate at 25000, with 11 Mbps of upload in theory he should be able to support something like 50 clients...
I
suppose that, if a high sv_maxfps sends more data to the clients, that should not exceed "sv_maxrate" and "rate" values anyway (else, what would "rate" do?), and thus less important data would be discarded... maybe the problem could be that
too much data is discarded?
PS: TheGeez did not mention his sv_maxrate value.
This is an interesting question which can be answered by several different manners according to my theories :
- sv_fps too high for connection to handle : the sv_fps is so high that the server's AND client's connections are too slow to handle. Indeed, in the case of a fast server and a slow client, the client will have some hard time playing if it can't manage the sv_fps because (as you said) it will have to discard snapshots, but here you have 2 possible cases :
* the client has a high snaps. In this case, the client will skip and have jerking movements because it will have flunctuating, unstable flow of data.
* the client has a low snaps. Here, the client will get a constant flow of snapshots adapted to its connection, but it will have to interpolate, and I think that the interpolation between constantly missing snaps is not very good (indeed, the network optimization code was made considering that the client gets regularly the server's snapshots, if it misses 1 snapshot on 2 (or even 3 or 4 ...) then the interpolation may be very bad because the loss is as regular as the packets received !).
Overall, I think that in this case the client should set a low snaps. Better get a constant loss than an unstable flow.
- Highly unstable flow, very high standard deviation : the sv_fps is not a multiple of the client's com_maxfps, which produces a highly unstable flow (very high standard deviation).
I will take the example of The Geez :
Considering that sv_fps = 100, we will hypothetize here that most players will have set com_maxfps = 125 and snaps = 100.
This means that the client gets 100 snapshots per second, but have to process them 125 times per second. As you can imagine, this is very complicated. In other words, this is what will probably happen :
frame 1: process snapshot 1
frame 2: nothing
frame 3: process snapshot 2
frame 4: process snapshot 3
frame 5: nothing
frame 6: process snapshot 4
frame 7: nothing
frame 8: process snapshot 5
frame 9: process snapshot 6
and so on...
And this is in the case that players have snaps = 100 ! If they have snaps = 20, you can divide by 5 :
frame 1: process snapshot 1
frame 2: nothing
frame 3: nothing
frame 4: nothing
frame 5: process snapshot 2
frame 6: nothing
frame 7: nothing
frame 8: process snapshot 3
frame 9: nothing
and so on...
As you can see, it's highly unstable, because the engine has to interpolate sometimes between 5 snapshots, sometimes 4, sometimes 7, sometimes more or less... The other problem is that players are no more synchronized, because while player1 process snapshot 2 at frame 5, another player2 can process snapshot 2 at frame 7, and so on... Resulting in lags for everyone.
This problem is particularly vicious as it hit everyone, even clients with a very fast connection.
See :
http://www.urbanterror.info/forums/topic/19188-suggestion-wierd-behavior-of-the-engine-snapss-perhaps-important/page__p__244181#entry244181- sv_fps is higher than client's com_maxfps. This is the worst case, as the client is always behind the train.
Example of The Geez :
sv_fps = 100 and client's com_maxfps = 85 (default new player's value) and snaps = 85
The maths are simple here. Even if snaps would really be set at 85 (in real it would be converted to the nearest lesser neighbour of 85 which is a multiple of 100 = 50), the client would get only 85 snapshots per second. Where are the last 11 snapshots ? The client's engine doesn't even know about them, because it expects to get a maximum of 85 snapshots since it is limited by com_maxfps = 85 (datas get processed only by frames, not in between).
So here you always lose 15 snapshots without even knowing it. No doubt that the player will suffer from lags. Anyway the other players with a higher fps will not suffer from this problem.
---
The key here is the
stability of the connection.
The problem here and in most cases of servers lags is NOT the speed of the connection, nor the number of snapshots and packets, but the standard deviation from a constant flow. We all know that lags is a direct result of an unstable flow of packets, so servers (and clients) should be configured with a goal of stability and NOT a goal of high performance. So instead of setting a very high value, the best is to set a low value that would fit most players.
This is why I (and the guys at urbanterror) propose sv_fps 25 because com_maxfps = 125 is the most popular setting for FPS. If it was different, then another setting for sv_fps should be used.
sv_fps = 100 is a very bad idea which, as I demonstrated, can only produce an unstable flow of packets (=> lags).
These theories would explain why, by lowering the sv_fps value, in any of these cases it would reduce the problem by reducing the connection burden/standard deviation/surplus of frames lost.
Basically, you can try 2 things to test my theories :
- server's set sv_fps = 125 and your clients com_maxfps = 125, cl_maxPackets = 125 and snaps = 125. Everything should be fine (unless your connection really has a problem and is too slow, but that should not be the case as I can read your specs).
- set your server's sv_fps to another multiple of 125 : 63, 42, 32, 25 (the best being 125 and 25 as these two values are not rounded up). sv_fps = 5 should be very stable too but a little too small value :p.
Anyway, I add my voice to those advising to connect directly to the ADSL and not use Wireless, because most wireless connections will drop packets and they not necessarily ensure a stable connection and latency since they can (as sago007 pointed out) package the packets, and send them later (which makes no difference when you download a big movie, but makes a lot of difference when hosting a game server).
@7
I agree with almost everything you said, none of this contradicts what I explained. Anyway, I notice that you don't take account of the cl_maxpackets in your schema, which is very important and explains why, even if indeed you receive one snapshot each 50 ms, it is not really a lag since your actions are acknowledged, and because it is a constant delay which is unnoticeable.
About the snaps = 999, I agree but the server would implose way before the client

So not even one server would have the audacity to set such a ridiculous amount. I advised this value because it would then adapt to any other sv_fps value, but indeed a more reasonable value would be 125 (same as your fps) for example, which makes much more sense since it would respect the scheme :
1000ms >= client's com_maxFPS >= client's cl_maxPackets >= server's sv_fps >= client's snaps
1000ms >= 125 >= 125 >= 125 >= 125
So in the end, just set the same value for everyone of these parameters and you should be ok
Changing sv_fps from 20 to 25 gives not only the benefice of lowering the server's snapshots delay from 50ms to 40ms, the main aspect is that it gives a
solid 0 standard deviation for clients with com_maxfps = 125 (or a multiple). This means that you drop not even 1 packet, no irregular interpolation to fix losses, nothing : the connection is really stable. See (again) for demonstration :
http://www.urbanterror.info/forums/topic/19188-suggestion-wierd-behavior-of-the-engine-snapss-perhaps-important/page__p__244181#entry244181But I agree that changing sv_fps to 25 instead of the default 20 is dangerous because of the new players with default settings, but the argument does not reside in changing sv_fps or not but changing the default connection parameters in OpenArena at first launch. Indeed, if we had to configure servers depending on new players' parameters, we would have to set very low parameters (ie: maxrate, sv_fps), so in the end, we would have very slow performances. I'd rather adopt an attitude of pedagogy, optimizing the servers parameters, and teaching new players about how to edit them (you have /players, /serverstatus and automatic chat messages with third party tools to do help you in this task - /players and /serverstatus helps to determine the players with a very low maxrate or maxpackets, and some mods like ExcessivePlus help to go further). But things evolved a bit since last OA version and the first-time connection wizard.
This is a great step forward, but we need to go further, and
snaps 20 is definately a BAD value since you can NOT set a multiple of 20 for com_maxfps, so you necessarily end up with an unstable connection with this setting.About the rest, no I don't confuse arQon CPMA's network code with unlagged and with sago's work, I was talking about the standard way Quake 3 Arena engine was working (almost all the network codes were made for this engine, not for ioquake3, CPMA/unlagged/ExcessivePlus included). But sago's work is the most promising of course

About the 4th point, this is a sideeffect that was noticed by a lot of players during the league because of the sv_fps 25, and unlagged was enabled. But after all, there was no foolproof demonstration. But one could compare the hits ratio of a server with sv_fps 20 and another with sv_fps 25 to try to investigate this issue.
And congrats to you 7 and Gig for the server's administration wiki, you guys did a remarkable job.
/Edit:
I think that the best way to update this whole system would be to no more reason in terms of number of packets or snapshots, but in term of frames (since everything is ruled by frames here), and so the variables should be ruled this way.
Example : instead of snaps = 25, we would have snaps = 1 for 1 snapshot per frame, or snaps = 2 for 1 snapshot each 2 frames.
instead of cl_maxPackets = 125 we would have cl_maxPackets = 1 for 1 packet per frame, or cl_maxPackets = 2 for one packet each 2 frames.
etc. for the other parameters that are constrained the same fashion.
This nomenclatura would avoid any confusion.