# Slow down Internet speed

## Manu311

Hey,

I've setup a old server for my network for rsync and mail etc and added everything to cronjobs (obviously), but when I'm playing something on an other pc I need a good ping which is destroyed if such a cron is active.

So I thought about slowing down the traffic the server is creating, but I don't know how I could do that.

Any advices?

Btw, I haven't set it up as router (since I'm to stupid to I guess :S and my router has a telephone port and wlan, which my server doesn't) only as a client.

Manu

----------

## PaulBredbury

See setup for hints.

----------

## Manu311

Do I realy need to check every command used there? Isn't it possible to simply execute a single command that reduces every connection from my server to the internet to e.g. 10kB/s?

----------

## PaulBredbury

Sounds like you're asking the wrong question. You want (outgoing) packet prioritization, not throttling.

----------

## Manu311

 *PaulBredbury wrote:*   

> Sounds like you're asking the wrong question. You want (outgoing) packet prioritization, not throttling.

  I don't want priorization, that would increase my ping and just decrease the traffic when it is needed by something else.

----------

## PaulBredbury

No, your reasoning is wrong. Just prioritize your game "pings".

----------

## Manu311

 *PaulBredbury wrote:*   

> No, your reasoning is wrong. Just prioritize your game "pings".

 Just tell me one thing, will email receiving use my full connection if I don't "play"? If that's the case, it won't work.

If you want a simple reason:

My server doesn't have any clue if my main pc is doing anything inside the net, since he isn't involved in it at all.

----------

## Hu

OP: the correct solution, and therefore the commands to implement it, depend on your network topology.  If you have a Linux-based machine acting as a chokepoint for the network, it can prioritize and/or throttle traffic sent to your ISP.  If you have a dumb device (e.g. many consumer grade "routers") acting as a chokepoint for the network, and both your game machine and e-mail machine connect to the dumb device via a switch, then your e-mail server will need to self-throttle at all times.

Receiving traffic is much harder to throttle.  You cannot guarantee that the other end will understand and respect ECN.  You can throttle incoming traffic by throttling your ACKs outbound or by throttling the rate at which the incoming traffic is received by the e-mail daemon.  Both methods will eventually trick the remote end into believing that you have very little download bandwidth, at which point the remote should slow down its transmissions.  Both are approximations, and may be considerably more coarse than you want.

----------

## Manu311

Exactly that's what I want, I don't know much about those network mechanics, so I ask here, could you tell me how to do it or gimme a tutorial somewhere?

----------

## Bones McCracker

http://www.funtoo.org/wiki/Traffic_Control

http://lartc.org/lartc.html

http://www.tldp.org/HOWTO/html_single/Traffic-Control-HOWTO/

----------

## solamour

I'm sure there are many other ways to accomplish what you are trying to do, but if your network looks like the following, I suggest you take a look at Shorewall's Simple Traffic Shaping/Control (http://www.shorewall.net/simple_traffic_shaping.html).

```
Server --------- Router --------- Internet

(rsync, mail)
```

Just install Shorewall to your "Server" machine and limit incoming (and/or outgoing) traffic bandwidth, such as the following.

```
eth0  External  30kbit
```

__

sol

----------

## Manu311

 *solamour wrote:*   

> I'm sure there are many other ways to accomplish what you are trying to do, but if your network looks like the following, I suggest you take a look at Shorewall's Simple Traffic Shaping/Control (http://www.shorewall.net/simple_traffic_shaping.html).
> 
> ```
> Server --------- Router --------- Internet
> 
> ...

 that looks perfect - easy and (hopefully) working just like I want it to.

Thanks

----------

## solamour

Please come back and share your success/unsuccess story, so that others who want to do the same thing can benefit from your experience.

__

sol

----------

## Manu311

I did exactly what you told me to, edited that file and posted exactly your content into it (for testing at least).

I also changed a few files so it will allow shorewall to start (interface, zones, etc).

Anyways, I tried to wget after that and it used 100% of my network - baaaad.

----------

