SpigotMC / BungeeCord

BungeeCord, the 6th in a generation of server portal suites. Efficiently proxies and maintains connections and transport between multiple Minecraft servers.
https://www.spigotmc.org/go/bungeecord
Other
1.58k stars 1.11k forks source link

Network compression threshold #2965

Open assasin541 opened 4 years ago

assasin541 commented 4 years ago

I have 2 dedicated servers, on 1 I have bukkit servers and on the other one bungeecord proxies. Bungeecord's dedicated server is on around 400mb/s download and 100mb/s upload. Bukkit's dedicated server is on around 40mb/s download and 400mb/s upload.

Should I set network compression threshold on bukkit servers or the bungeecords? I want to optimize performance and bandwidth usage/lag. I currently have it on 256 on bungee, how low can I safely go with it? Thanks for help.

Janmm14 commented 4 years ago

It is not useful to lower the compression threshold, as compression for such small packets might result in increased packet size in the end due to compression overhead. Small data size has a small chance of repeated bit sequences which are required for compression to work in the end.

You probably won't see a significant change in bandwhich usage as well if you increase that threshold to 512.

assasin541 commented 4 years ago

@Janmm14 all right, but if it's better to compress on bukkit or bungee side in my example?

Janmm14 commented 4 years ago

Bungee communicates with the users, so its better to compress there. But you should also compress at least the bigger packets on bukkit to not unneccessarily stress internal networking

assasin541 commented 4 years ago

@Janmm14 how do it properly? When I had network compression on boths sides I got kicked. Should I try with 512 on bukkit?

assasin541 commented 4 years ago

@Janmm14 can you give me a little advice?

assasin541 commented 4 years ago

@Janmm14 After compressing on bukkit I noticed up to 400% less bandwith usage. Maybe it's better to just compress on bukkit side, especially when bungee and bukkit servers are on different dedicated servers?