Raised This Month: $51 Target: $400
 12% 

Solved Empires: Buffer Overflow Optimizations?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Xiaminou
Junior Member
Join Date: Apr 2017
Old 10-19-2018 , 08:26   Empires: Buffer Overflow Optimizations?
Reply With Quote #1

I own a server on Empires which uses Source Engine. We've recently come across a problem which occurs when there's too much data being sent at once which causes clients to get disconnected with a Buffer Overflow error.
This occurs most often when people use voice, but not only, as Empires is a game that uses a lot of entities and complex interactions between them.

I would like to know if there are any server side optimizations that I could apply in order to limit the amount of Buffer Overflows. Disabling voice is not an option as it is required to play the game properly.
How do other games deal with the Buffer Overflows problems?

Here's what I have so far:
Code:
sv_maxrate 0					//The maximum bytes/sec the server will send to the client.
sv_minrate 1000000				//value is in bytes/sec. Overrides the client's rate setting if it is less than sv_minrate.
sv_minupdaterate 33				//The minimum amount of updates the server will send to the client. Change this to what your tickrate is.
sv_maxupdaterate 66				//The maximum amount of updates the server will send to the client. Change this to what your tickrate is.
sv_mincmdrate 33				//The minimum amount of updates the client can send to the server. Change this to what your tickrate is. 
sv_maxcmdrate 66				//The maximum amount of updates the client can send to the server. Change this to what your tickrate is.
net_splitpacket_maxrate 1048576			//
net_splitrate 2					//Maximum number of fragments per frame.
fps_max 0
net_maxcleartime 0.01 				//Max # of seconds we can wait for next packets to be sent based on rate setting (0 == no limit).
sv_parallel_sendsnapshot 1			//controls whether the sending of network data is done on the main thread (when set to zero) or on worker threads (when set to one).

Last edited by Xiaminou; 11-08-2018 at 19:11.
Xiaminou is offline
backwards
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 10-19-2018 , 16:08   Re: Empires: Buffer Overflow Optimizations?
Reply With Quote #2

if you use net_compresspackets 1 it should reduce the issue but will cause more cpu usage for the client and server. The sv_parallel commands tend to make the buffer overflows pop up more frequently (at least in other source engine games). You can also set a maxrate and set net_splitrate to 1 which will also reduce the packets sent to clients. This all can make the client receive info delayed but it's really the only solutions. The developers of the game should increase the network buffer size for clients by default honestly.
__________________
I highly recommend joining the SourceMod Discord Server for real time support.
backwards is offline
Xiaminou
Junior Member
Join Date: Apr 2017
Old 10-22-2018 , 16:47   Re: Empires: Buffer Overflow Optimizations?
Reply With Quote #3

Thank you.
We had not had a large amount of players since I added these new parameters:
Code:
net_splitpacket_maxrate 1048576			//
net_maxcleartime 0.01 				//Max # of seconds we can wait for next packets to be sent based on rate setting (0 == no limit).
sv_parallel_sendsnapshot 1			//controls whether the sending of network data is done on the main thread (when set to zero) or on worker threads (when set to one).
and as it turns out it seems to have taken care of the buffer overflow problems.
We were able to play a 25vs25 with many vehicles and buildings without a single buffer overflow or server choke.
I wish I had found out about these earlier, but at least now we can have stable games.

Last edited by Xiaminou; 10-22-2018 at 16:47.
Xiaminou is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode