New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CURLOPT_WRITEFUNCTION can't be made to use larger writes #2372
Comments
|
Somewhat related question: should setting |
|
The
Maybe. I'm not sure that makes much of a difference in modern systems. Does it?
There certainly is. You can just run comparisons and see for yourself, especially for SFTP over high latency connections. |
Fair enough. Could we add a new knob as It would only be used by aware programs, obviously...
It can. Depends on your bandwidth x delay product. |
|
I should explain part of our usage scenario: we're doing passive and active test and measurement in SoHo routers (so uni- or dual-core, 32-bit embedded processors running at 800Mhz or below, typically) and under heavy load, they spend (or should spend) little time in user-space, spending most of their time in the network stack in the soft-irq handling processing packets. I'm trying to get |
|
I really appreciate getting your insights and feedback and if you can back up your change suggestions with numbers that prove how they actually make a real difference then I'm all for discussing how we can and should proceed to make sure you can cram out as much performance as possible from libcurl. Ideally of course without having to add new options or changing the API, but if that's what's required to boost performance then let's discuss such as well! |
|
I'll get you some data on that when I get a chance... right now I'm dealing with a different problem having to do with pausing/unpausing connections. |
I did this
Using the Easy interface, set up an HTTP transfer for a Youtube video (about 77MB long) and added some debugging to the write callback function to dump the buffer pointer and size. Then I added a calll set
CURLOPT_BUFFERSIZE.Running the code, nothing seems to affect the number of bytes sent to the write callback.
Looking at
Curl_client_chop_write()at looks like there's no way to send more thanCURL_MAX_WRITE_SIZEwhich is compiled in, regardless of whatCURLOPT_BUFFERSIZEis selected.Question: could the amount of data passed to the write function be controlled by a run-time parameter
1 <= n <= data->set.buffer_size?I expected the following
Wanted to see fewer writes with more data per write when optimizing for large files over fast connections (1Gb/s and faster).
My call back works best when processing large amounts of data (512K might even be too small) and has time to iterate long enough to saturate the cache.
curl/libcurl version
i.e.
libcurl-7.55.1-9.fc27.x86_64.operating system
Fedora 27
The text was updated successfully, but these errors were encountered: