Tsuey / L4D2-Community-Update

Help us shape the potential future of L4D2 vanilla.
68 stars 22 forks source link

Increase a "rate" CVARs limits #516

Open V3nilla opened 1 month ago

V3nilla commented 1 month ago

Suggestion

On many unofficial(custom), competitive servers, the servers tickrate is 100, as well as the servers rates have been changed to 100000 using the plugin, but on the client side they are still limited to 30000, which affects on hitreg and synchronization between the client and the server. Please increase the "sv_minrate", "sv_maxrate", "net_splitpacket_maxrate" and "rate" limits on the client's side

Localia-cn commented 1 month ago

You can set the following server cvars to force the client to 100 tick. sm_cvar sv_minrate 100000 sm_cvar sv_maxrate 100000 sm_cvar sv_minupdaterate 100 sm_cvar sv_maxupdaterate 100 sm_cvar sv_mincmdrate 100 sm_cvar sv_maxcmdrate 100

V3nilla commented 1 month ago

You can set the following server cvars to force the client to 100 tick. sm_cvar sv_minrate 100000 sm_cvar sv_maxrate 100000 sm_cvar sv_minupdaterate 100 sm_cvar sv_maxupdaterate 100 sm_cvar sv_mincmdrate 100 sm_cvar sv_maxcmdrate 100

Its for server-side only, all of these commands limited to 30000 on client-side, not for server-side. That's what I'm talking about. I have visited many T1 servers, and none has 100000, the maximum is 30000 because this is the maximum limit that is set on the client-side, and on the server-side it is 100000, because there is a separate plugin used to set 100 tickrate and remove "rate" limits

A1mDev commented 1 month ago

Are you sure about this, I always thought that a warning is displayed in the console and in fact the client adapts to the server?

V3nilla commented 1 month ago

Are you sure about this, I always thought that a warning is displayed in the console and in fact the client adapts to the server?

Let's take an example of an Aurora server with a tickrate of 100, net_graph shows a value of 100, but this does not indicate that 100 data packets per second are transmitted from the client to the server. Let's look at the values of sv_minrate, sv_maxrate and rate from the client, and we will see that it reaches the limit of 30000 and we can not put more in anyway. If we think correctly, then the client sends only 30 packets out of 100 possible on the server, which can cause problems with hitreg

A1mDev commented 1 month ago

I'll check if there really is a limit. If so, then it would be nice to increase the values in the game.

V3nilla commented 1 month ago

I'll check if there really is a limit. If so, then it would be nice to increase the values in the game.

Just type these commands from client, and you'll see

Localia-cn commented 1 month ago

Can you provide screenshots and the ip of the server where the problem occurred?

Cvars using "sv" as a prefix should only used for "Dedicated Server" or "Listen Server", the client does not need them. For the client, the cvars you should actually set are "cl_cmdrate 100" and "cl_updaterate 100".

But as shown in this picture. Even if you set the client to 10 tick, it will still use the server's rate setting (in this case, it is 60 tick) 60t

V3nilla commented 1 month ago

Can you provide screenshots and the ip of the server where the problem occurred?

Cvars using "sv" as a prefix should only used for "Dedicated Server" or "Listen Server", the client does not need them. For the client, the cvars you should actually set are "cl_cmdrate 100" and "cl_updaterate 100".

But as shown in this picture. Even if you set the client to 10 tick, it will still use the server's rate setting (in this case, it is 60 tick) 60t

This only shows updaterate and cmdrate which is not a proof. And this problem on ALL servers, that use non-standard 30 tick(like 60 or 100, maybe even more)

V3nilla commented 1 month ago

T1 100 Tick server. Here is a screenshot: image

Localia-cn commented 1 month ago

60吨

I am not sure what you mean, but I have confirmed using Wireshark that there are indeed 60 packets per second sent from the server to the client, and also 60 packets per second sent from the client to the server.

V3nilla commented 1 month ago

能否提供一下截图以及发生问题的服务器ip呢? 以“sv”为前缀的变量只应用于“专用服务器”或“监听服务器”,客户端不需要它们。对于客户端,您实际应该设置的变量是“cl_cmdrate 100”和“cl_updaterate 100”。 但如本图所示。即使你将客户端设置为 10 tick,它仍将使用服务器的速率设置(在本例中为 60 tick)60吨

这仅显示 updaterate 和 cmdrate,这不是证据。并且所有使用非标准 30 tick(如 60 或 100,甚至更多)的服务器都存在此问题 I am not sure what you mean, but I have confirmed using Wireshark that there are indeed 60 packets per second sent from the server to the client, and also 60 packets per second sent from the client to the server.

I'm still not sure about that. If there should be 100000, then at least this number would be displayed in these commands, even when the limit is 30000 for the client. If this number is not displayed, then most likely the 30000 limit cannot be overcome for clients without changes to the .dll files of the game. We should also find out the answer from the developers, maybe they will say something about this

A1mDev commented 1 month ago

I'm a developer, wait, I'll check :D

A1mDev commented 1 month ago

The client really has a limit of 30,000, but the question is, will removing this limit really change anything? For example, rates values in csgo increased:

// Flow control bytes per second limits:
// 16,000 bytes per second = 128kbps
// default rate: 192kbytes per second = 1.5mbps
// 0.75Mbytes per second = 6mbps
#define MIN_RATE          16000
#define DEFAULT_RATE     196608
#define MAX_RATE         786432
A1mDev commented 1 month ago

Also this value is limited by server cvars sv_minrate and sv_maxrate (its have the replicate flag), so maybe the request to increase the rates is not so bad for mod servers.

Localia-cn commented 1 month ago

The client really has a limit of 30,000, but the question is, will removing this limit really change anything? For example, rates values in csgo increased:

// Flow control bytes per second limits:
// 16,000 bytes per second = 128kbps
// default rate: 192kbytes per second = 1.5mbps
// 0.75Mbytes per second = 6mbps
#define MIN_RATE        16000
#define DEFAULT_RATE   196608
#define MAX_RATE       786432

Sorry, I think I confused the concepts of tickrate and rate before, V3nilla is right. So does this mean that if the data sent from the server to the client exceeds 29.3 KB/s (30000 bytes per second), the excess will be droped? I think this may explain why there is a lot of loss in the network during peak entity counts on my 60 tick server. Does this also mean that servers with higher tickrates are more likely to be affected by rate limitations? If so, I also pray for an increase in it. 🙏

A1mDev commented 1 month ago

The client really has a limit of 30,000, but the question is, will removing this limit really change anything? For example, rates

I'll test what happens if I increase the values, I'm interested in it myself.

V3nilla commented 1 month ago

The client really has a limit of 30,000, but the question is, will removing this limit really change anything? For example, rates values in csgo increased:

// Flow control bytes per second limits:
// 16,000 bytes per second = 128kbps
// default rate: 192kbytes per second = 1.5mbps
// 0.75Mbytes per second = 6mbps
#define MIN_RATE        16000
#define DEFAULT_RATE   196608
#define MAX_RATE       786432

Then developers need to increase the limits on server and on client at the same time. I hope that they will see about this problem and fix it ASAP.

A1mDev commented 1 month ago

The client really has a limit of 30,000, but the question is, will removing this limit really change anything? For example, rates values in csgo increased:

// Flow control bytes per second limits:
// 16,000 bytes per second = 128kbps
// default rate: 192kbytes per second = 1.5mbps
// 0.75Mbytes per second = 6mbps
#define MIN_RATE          16000
#define DEFAULT_RATE     196608
#define MAX_RATE         786432

Then developers need to increase the limits on server and on client at the same time. I hope that they will see about this problem and fix it ASAP.

Yes, it would be nice, need to change 1 line, and it won’t break anything, because there will be a limitation on the server.

V3nilla commented 1 month ago

The client really has a limit of 30,000, but the question is, will removing this limit really change anything? For example, rates values in csgo increased:

// Flow control bytes per second limits:
// 16,000 bytes per second = 128kbps
// default rate: 192kbytes per second = 1.5mbps
// 0.75Mbytes per second = 6mbps
#define MIN_RATE        16000
#define DEFAULT_RATE   196608
#define MAX_RATE       786432

Then developers need to increase the limits on server and on client at the same time. I hope that they will see about this problem and fix it ASAP.

Yes, it would be nice, need to change 1 line, and it won’t break anything, because there will be a limitation on the server.

Now, it remains only to wait dev's answer