curl-library
Re:RE: Re:RE: slow uploading speed for single task on osx
Date: Thu, 5 Dec 2013 20:16:17 +0800
After some simple tests, I found that it takes several more times to execute the curl_multi_perform function when there is only one active task.
To be concrete, the curl_multi_perform function ran 6 times per second when there was only one active task, and the number went up to 200 times per second when there are 3 tasks.
------------------ Original ------------------
From: "Yehezkel Horowitz";<horowity_at_checkpoint.com>;
Date: Thu, Dec 5, 2013 07:24 PM
To: "libcurl development"<curl-library_at_cool.haxx.se>;
Subject: RE: Re:RE: slow uploading speed for single task on osx
> timeval timeout = {0, IO_IDLE_WAIT_INTERVAL * 1000};
> select(max_fd, &read_fdset, &write_fdset, &exc_fdset, &timeout);
What is the value of IO_IDLE_WAIT_INTERVAL?
According to curl documentation, you should use curl_multi_timeout to figure out the needed timeout for the select call.
Please read http://curl.haxx.se/libcurl/c/curl_multi_fdset.html
BTW, consider use curl_multi_socket_action API instead of curl_multi_perform.
------------------ Original ------------------
From: "Yehezkel Horowitz";<horowity_at_checkpoint.com>;
Date: Thu, Dec 5, 2013 06:22 PM
To: "libcurl development"<curl-library_at_cool.haxx.se>;
Subject: RE: slow uploading speed for single task on osx
>> The lib curl version is 7.26. And because the code concerning about
>> lib curl is deeply embedded into the solution, it might be a little
>> bit hard to extract the complete sample code to repeat the problem :(
>The multi interface has nothing in itself that makes it slower than the easy interface (unless you've found a bug). I would say that it is likely something in your use of it that makes it slow.
Maybe when there are more than one transfer, the application call curl_multi_perform or curl_multi_socket_action more frequently.
This is indeed wrong usage, as the calls should be done according to events (socket/timeout).
Please give us more details when you call curl_multi_perform/curl_multi_socket_action from your code (what is the trigger to those calls), and when you call it with CURL_SOCKET_TIMEOUT...
Regards,
Yehezkel Horowitz
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-12-05