Limiting Outbound Per IP

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
Post Reply
{{Classic}}
A semi-regular
A semi-regular
Posts: 26
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Fri Feb 18, 2011 2:02 pm

Limiting Outbound Per IP

Post by {{Classic}} »

So, on my WIN2K8 R2 VDS, one of the things running is a Minecraft server. My friend has been complaining of lag lately, although, I never seem to get any. While monitoring the server, I noticed the bandwidth spike when it sends the map chunks to the clients. With just myself and my friend on, moving around the map, the server at one point spiked to 1.4mbps, but averaged between 600-900kbps.... which I thought was a bit excessive, since when the map isn't loading areas, the server runs at around 20-50kbps on average... so this is a huge spike... IMO anyways. I have not ran game servers on a VDS/Dedicated prior to this, so perhaps this bandwidth is in the norm.

I was going to look into trying to reduce the lag he was gettin', and after seeing that spike, thought it may be best to limit the bandwidth to a constant. Right now, it appears that the client will grab data as fast as the server can send it... or pretty much, the download for the client seems to hit the cap for their ISP's download speeds.

Right now, I am trying to figure out how I can put a cap on all outbound data... so say, each IP will only receive a max of 400kbps from the server... or something along those lines. I have been searching around the web for ways to do this, and a lot of it appears to be done through gateways and routers. I have also been looking at some 3rd party software to accomplish this, but not sure how well they will work.

Anyone have any ideas or suggestions? They will be greatly appreciated! ;) Thanks!
User avatar
Edge100x
Founder
Founder
Posts: 12947
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Limiting Outbound Per IP

Post by Edge100x »

Most clients have 10mbps+ download throughput, so I don't think that the amount of usage that you're seeing would cause a problem for them. I also would suspect that throttling the usage would cause even worse problems for those clients (as their game is likely waiting for the data before proceeding).

Does your friend have a high latency to the server? This doesn't make as much of a difference for Minecraft, but does make a difference for other games. Also, is his personal machine a bit slower than yours? He may be seeing CPU usage spikes on his client, as it processes the data.
User avatar
Vanderburg
Former staff
Former staff
Posts: 1253
Joined: Sat Nov 13, 2010 7:27 am
Location: Dallas, TX

Re: Limiting Outbound Per IP

Post by Vanderburg »

You might actually be surprised to know that the majority of the Minecraft bandwidth is inbound to the server. I am not sure why this is, but here is an example:
Image

This is on my Minecraft-only dedi.
{{Classic}}
A semi-regular
A semi-regular
Posts: 26
Joined: Fri Feb 18, 2011 2:02 pm

Re: Limiting Outbound Per IP

Post by {{Classic}} »

Edge100x wrote:Most clients have 10mbps+ download throughput, so I don't think that the amount of usage that you're seeing would cause a problem for them. I also would suspect that throttling the usage would cause even worse problems for those clients (as their game is likely waiting for the data before proceeding).

Does your friend have a high latency to the server? This doesn't make as much of a difference for Minecraft, but does make a difference for other games. Also, is his personal machine a bit slower than yours? He may be seeing CPU usage spikes on his client, as it processes the data.
Not sure how to have him check for the latency. Pinging the server just keeps coming back with 'Request Timed Out.' His PC is a bit older, and slower, but when I was hosting this from my home connection (broadband ISP), he says it lagged a lot less for him... so just trying to nail down why exactly, this is lagging more for him now. It could well be on his end... I dunno yet.
User avatar
Edge100x
Founder
Founder
Posts: 12947
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Limiting Outbound Per IP

Post by Edge100x »

Minecraft also might have updated since you hosted, or the map might have gotten large enough for it to become more noticeable.

If the ping is timing out, you may have a firewall enabled. I would recommend running without a firewall to maximize performance. Just be very careful what services you run, make sure to keep everything up to date, and don't use the machine for client activities such as web browsing, for security reasons.
{{Classic}}
A semi-regular
A semi-regular
Posts: 26
Joined: Fri Feb 18, 2011 2:02 pm

Re: Limiting Outbound Per IP

Post by {{Classic}} »

Alright, thanks a lot. ;)
User avatar
Edge100x
Founder
Founder
Posts: 12947
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Limiting Outbound Per IP

Post by Edge100x »

Vanderburg, in our control panel graphs, green means inbound to us (NFO) from your server, so it would represent outbound traffic to the internet.
{{Classic}}
A semi-regular
A semi-regular
Posts: 26
Joined: Fri Feb 18, 2011 2:02 pm

Re: Limiting Outbound Per IP

Post by {{Classic}} »

So I just had my friend ping the server. His highest ping was 36ms, his lowest and average were both 34ms.
User avatar
Vanderburg
Former staff
Former staff
Posts: 1253
Joined: Sat Nov 13, 2010 7:27 am
Location: Dallas, TX

Re: Limiting Outbound Per IP

Post by Vanderburg »

In Minecraft you only ever have 81 chunks loaded to your client at any given time so world size shouldn't affect anything but the server (Since it doesn't have to load the same chunk twice for two players occupying that chunk, bigger world = more likely they are using different chunks).

Also, if you are using the default Windows Firewall, there's no good reason why he would time out and you aren't. And even though this is a pretty simple looking Java game, the system requirements are up there to a game, like, say... World of Warcraft.

The first things you want to have him check are his in-game settings. Graphics to simple, not fancy and increase the fog setting. Oh yeah, and if you hold F3, you'll see a CPU graph on the bottom. If it's in the red, his computer is struggling.
{{Classic}}
A semi-regular
A semi-regular
Posts: 26
Joined: Fri Feb 18, 2011 2:02 pm

Re: Limiting Outbound Per IP

Post by {{Classic}} »

Vanderburg wrote:In Minecraft you only ever have 81 chunks loaded to your client at any given time so world size shouldn't affect anything but the server (Since it doesn't have to load the same chunk twice for two players occupying that chunk, bigger world = more likely they are using different chunks).

Also, if you are using the default Windows Firewall, there's no good reason why he would time out and you aren't. And even though this is a pretty simple looking Java game, the system requirements are up there to a game, like, say... World of Warcraft.

The first things you want to have him check are his in-game settings. Graphics to simple, not fancy and increase the fog setting. Oh yeah, and if you hold F3, you'll see a CPU graph on the bottom. If it's in the red, his computer is struggling.
I agree, this game eats some serious RAM. ;) It was the pings timing out, because of the firewall... no timing out in the game. He is just gettin' some lag.
Post Reply