[p2p-hackers] UDP file transfer protocol peer review
David Barrett
dbarrett at quinthar.com
Sat Jul 23 18:54:02 UTC 2005
Saikat Guha wrote:
>
> Since the point to which you cut back always increases, this approach
> will not work with competing traffic or when the bottleneck link
> bandwidth decreases, and you'll keep pegging the network.
>
> Consider the line formed by joining the local minimas |/. The line is
> some sort of logarithmic curve (shown with +).
>
>
> |- - - -|- -/|-/|/+++++- - link speed
> | | / |/+++
> | || / ++
> r| ||/+
> a| |+
> t| |
> e| |
> | /
> |__-^
> +-------------------------- time
> 0 a b c d e ...
Don't you love ASCII art? :)
> 1) Your approach will never send fewer packets than this line
> 2) The line will be monotonically increasing
> 3) It will increase up to the link speed over time
Though I'll admit it wasn't clear from my original post, my intent to
resolve this is encoded in this paragraph:
> The "floor" is a deviation from TCP (which always uses a zero
> floor), and is actually the top value of a stack that is adjusted
> as follows:
> - When decreasing after period of increase, push "newRate" on top
> - When decreasing twice in a row, pop the stack
> - If the stack is empty, reset to initial values
Basically, the first time you decrease, you drop to the "floor" of your
latest attempt to increase. If the floor itself is too fast, then you
drop back to the floor before that, bottoming out at the initial state.
Thus if the link speed does in fact remain constant and I'm not
competing with anyone else, by design it should monotonoically increase
with the link speed as a sort of asymptote. (Though I'm reconsidering
this in light of our discussion about competing more aggressively than TCP.)
But, if the link speed changes or competition increases, then it'll back
off first a little, and then a lot, and eventually restart over from
scratch.
-david
More information about the P2p-hackers
mailing list