Taken from MAN pages:
wondershaper is a traffic shaping script that provides low latency, prioritizes bulk transfers below normal web traffic, prioritizes interactive shells above normal web traffic, and attempts to prevent upload and download traffic from affecting each other’s ack packets. Put simply, the wondershaper makes your internet connection more “responsive”.
apt-get install wondershaper
wondershaper [interface] [downlink] [uplink]
wondershaper venet0 256 256
Note: the speeds are in KBps.