Re: throttling suggestions ?
Re: throttling suggestions ?
- Subject: Re: throttling suggestions ?
- From: Nicolas Berloquin <email@hidden>
- Date: Wed, 28 Apr 2004 17:16:46 +0200
On 28 avr. 04, at 16:35, Peter Sichel wrote:
On Apr 28, 2004, at 9:41 AM, Nicolas Berloquin wrote:
I'm writing an app that does upload throttling (you set a max
upload rate).
Perhaps you could say more about how you are trying to do this.
I guess I'm doing more or less (1) :
- every 1/n times per second, I tell each peer (an objc class), than
they
can upload maxrate/ n / numPeers.
When one of them returns EWOULDBLOCK on send(), I add his slice
and give it to the remaining peers (this little trick fits real well
with
the protocole I'm handling).
And each peer has its own buffer that's waiting to be sent.
But I don't understand your (2).
I understand adjusting window size (I didn't think about it, would that
mean that I should set the send window size to the expected size
sent at each round, per second, ... ?
I don't understand the ACK part. I thought that I sent ACKs when I
received data, not when I send some.
Right now, I'm not manually controlling the receiving part (I let
CFSockets
do the job on their own thread), but thinking about it, if I fill their
send
queue, I wouldn't be able to send ACKs on data received anyway, humm...
(but that's another problem).
I still don't get the ACK part ^_^
thanks !
I'm familiar with two basic approaches:
(1) Buffering and waiting (Queueing) to simulate an impaired connection
(reduce the amount of data transferred per unit time).
Since TCP is adaptive, it should gradually adjust to the impaired
bandwidth.
Notice this doesn't address congestion and increases latency.
(2) Using TCP's built-in flow control mechanism to limit the rate at
which
data is actually sent. You do this by adjusting the window size
and
withholding or inserting ACKs to tell TCP when it is allowed to
send
more data and how much.
Kind Regards,
- Peter
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.