1

I want to slow my outgoing traffic when it encounters congestion, and measure "congestion" by packet response times. The intent is to avoid one NFS client starving all the other clients when performing large writes.

I've read a good deal of manpages, tutorials, and serverfault answers related to tc traffic throttling, but they all generally start with picking an arbitrary bandwidth cap, and i'd really like the system to automatically adjust itself when our networking components improve.

bukzor
  • 243
  • 3
  • 9
  • 1
    You get starving when there are large writes to the server, and you want to slow *outgoing* traffic? What you seem to want is ingress shaping, and that is kind of tricky. Also, are you sure you're not being hit by other factors, like disk starving? – Halfgaar Jul 17 '19 at 19:33
  • I have no control of the NFS server itself, only the clients -- it's a hosted cloud service. Disk starvation may also be in play but shaping the network NFS io should cause a similar shaping of disk io, and if throttling is done in response to congestion, it will respond correctly regardless of the exact cause. – bukzor Jul 17 '19 at 22:01

1 Answers1

0

So your clients share a router which they're using to communicate to an internet NFS server?

If this is a Linux router and you have tc there, I think you will actually benefit from outgoing rate limiting just below your ISP's limit, fair queuing like SFQ, and giving priority to small packets (like TCP ACK's; see the Wondershaper for examples).

Slowing connections due to overloading your ISPs buffers with large uploads is a classic problem, and is prevented by egress limiting to below your ISP limit, and then allowing your own router to shape your egress, like with the SFQ, and prioritizing TCP control packets to improve latency.

Halfgaar
  • 7,921
  • 5
  • 42
  • 81
  • No, not quite. All these machines are in a single cloud zone, but the client machines are managed by me while the NFS server is a fully-managed service. – bukzor Jul 18 '19 at 17:22
  • I would like to avoid setting manual hard limits on bandwidth because things will change and improve, and (if possible) my traffic shaping scheme should automatically take advantage of any newfound efficiency. – bukzor Jul 18 '19 at 17:22