curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Large download speed deviations for CURLOPT_MAX_RECV_SPEED_LARGE in 8.4.0

From: Dmitry Karpov via curl-library <curl-library_at_lists.haxx.se>
Date: Wed, 29 Nov 2023 20:17:35 +0000

Hi All,

I recently started migrating to libcurl 8.4.0 from 7.84.0 in some of my applications and noticed a seeming regression for CURLOPT_MAX_RECV_SPEED_LARGE option precision.
I use this option for download speed throttling, and it worked very well in 7.84.0 with a very good 5% precision.

But with 8.4.0, I see very big deviations (both higher and lower) - up to 20%, which negatively affect throttling features.

Here is a snapshot of my test logs illustrating the problem:

[7.84.0] < 5% deviation from CURLOPT_MAX_RECV_SPEED_LARGE:

max_speed=8000000 bps (1000000 B/s), 5MB download HTTP 1.1
    tfrt=5258ms, dnld=5242880, spd=7976608 bps
    tfrt=5261ms, dnld=5242880, spd=7972136 bps
    tfrt=5254ms, dnld=5242880, spd=7982592 bps

max_speed=16000000 bps (2000000 B/s), 5MB download HTTP 1.1
    tfrt=2625ms, dnld=5242880, spd=15975112 bps
    tfrt=2621ms, dnld=5242880, spd=16002032 bps
    tfrt=2620ms, dnld=5242880, spd=16005744 bps


[8.4.0] up to 20% deviation from CURLOPT_MAX_RECV_SPEED_LARGE:

max_speed=8000000 bps (1000000 B/s), 5MB download HTTP 1.1
    tfrt=5750ms, dnld=5242880, spd=7294240 bps
    tfrt=6935ms, dnld=5242880, spd=6047488 bps
    tfrt=6540ms, dnld=5242880, spd=6412544 bps

max_speed=16000000 bps (2000000 B/s), 5MB download HTTP 1.1
    tfrt=2541ms, dnld=5242880, spd=16506120 bps
    tfrt=2470ms, dnld=5242880, spd=16974568 bps
    tfrt=2834ms, dnld=5242880, spd=14796072 bps

I can see such big speed deviations regardless the network speed and download sizes.
I know that it is not easy to provide a very good speed precision, but such large speed swings don't seem right, compared to what it was in 7.84.0.

Is it something known or a not previously noticed regression in 8.4.0?

Thanks,
Dmitry Karpov




-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2023-11-29