cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: speed limit / speed time / limit rate

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 19 Feb 2004 23:52:56 +0100 (CET)

On Thu, 19 Feb 2004, David Byron wrote:

> > What if no low_speed_time is set? Then that variable will be 0 and that
> > MIN check looks bad.
>
> I'll fix that. What about the basic concept though?

It is good enough to me.

> This should make it harder for the bandwidth limiting to trigger the speed
> limit, but not impossible. It also makes it hard to explain what
> --limit-rate and --speed-limit really do when they're used together.

Yes, but we could be happy with mentioning that if you use --speed-limit when
doing --limit-rate, you may ruin the rate as curl tries not to ruin the
speed-limit with the rate logic. Or something like that.

> For example if curl needs to sleep for 35 seconds to satisfy the bandwidth
> limit, but only sleeps for 29 seconds because speed-time is 30, the
> speed-limit could trigger after only 1 second of a stalled connection when
> the user asked it to only trigger after 30.

Yes, it will make the behaviour different. Perhaps we could try some different
mathematics than simply using speed-time - 1...

> Trouble is, the better thing probably means moving the --limit-rate into
> libcurl so we can teach the speed limit code when curl is sleeping to limit
> bandwidth. If the speed limit code was aware of that, we could make sure it
> didn't fire because of the sleeping.

Right. But I don't see this happening in the nearest future, so this could be
a fix until that day comes.

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]
Received on 2004-02-19