# Dealing with slow upload speeds

## pk1

I have a cable modem connection with highly asymmetric upload vs. download speed. I have noticed that when I am doing a big upload (e.g. my daily backups), other connections will fail. This is presumably due to the upload queue filling up on the cable modem. 

I looked into a lot of the traffic shaping script on the net and they seemed complicated and I wasn't sure how to set them up. I don't really want different classes of connections but basically want no individual connection to starve out any of the others.

I am currently using the following commands (in postup in /etc/conf.d/net) to limit my upload speed (to 375kbps) and prevent the queue on the cable modem from filling:

```

tc qdisc del dev $IFACE root 2>/dev/null

tc qdisc add dev $IFACE root handle 1: htb default 1

tc class add dev $IFACE parent 1: classid 1:1 htb rate 375kbps

tc qdisc add dev $IFACE parent 1:1 sfq perturb 10

```

This seems to correct my problems, but I do occasionally have failed outgoing connections during an upload (maybe because my upload rate sometimes dips below 375kbps). Is there anyway to make this more dynamic? Is this a reasonable setup? Is there a better way to do this?

I have a Motorola SB6121 SURFboard DOCSIS 3.0 cable modem (maybe there is a way to modify the size of the upload queue on it?).

Thanks!

----------

## gerdesj

I don't know how to do it exactly but you probably want to prioritize outbound TCP ACKs over other traffic.  They are probably getting lost in the queues on your modem and causing the stalls.

Cheers

Jon

----------

