curl-library
Re: [PROF RFC 1/2] profiling of libcurl by curl-loader, steady state
Date: Thu, 19 Apr 2007 14:32:39 +0200 (CEST)
On Thu, 19 Apr 2007, Robert Iakobashvili wrote:
> Could you recommend a way (sharing?) do decrease memory consumption per
> client in libcurl?
Using the multi interface it already shares connections and DNS cache
automatically and then there's not much more to share. The easy struct has a
bunch of variables for internal house-keeping and then there are the buffers:
There are no less than three buffers allocated at CURL_MAX_WRITE_SIZE (16K),
so 16*3=48K is "wasted" there already. You can of course:
1 - change the code to alloc the required buffer(s) once they're needed, as
the upload buffer is rather pointless without uploads and I believe the
master_buffer can be skipped if not using pipeline...
2 - experiment with lowering the CURL_MAX_WRITE_SIZE value, but that might of
course also risk getting a slower throughput.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2007-04-19