I would like to use my 100/100 Mbps connection for Tor. I want to give it all my spare capacity, but I do not want to have my connection slowed down by Tor the 1% of the time when I actually need the 100 Mbps.I have Tor on a separate server connected to the LAN.[TOR-server] [Host2] [Host3] ... [Hostn]     |          |       |           |     +----------+-------+-----------+                    |                 [Router1]                    |                 [Router2]                    |                [Internet][Router1], [Router2] and [Host2] ... [Hostn] cannot be changed. The limiting link is typically between [Router1] and [Router2].Ideally I want to only slow down network to/from the tor process on [TOR-server] but it is acceptable if the network to/from the whole [TOR-server] is limited. I have been unable to find a qdisc that looks at round trip time to an external host.How can I let Tor use all spare capacity, but slow down when others on the network need the bandwidth?Is there a general tool for that? Maybe similar to nice for CPU usage?I can see you could probably build it like this:# Find close router$hop2 = hop 2 of traceroute to 8.8.8.8# Ping the $hop2 to look for signs of congestionping $hop2 &while(true) {  if(reply time < 2 * median(reply times)) {    # latency normal    sleep 1  } else {    suspend($bandwidth_using_program, 1 second)  }}But is there already a well tested tool for this?
Use-spare-network-capacity wrapper (network nice)
networking;nice