Libcurl API - Slow performance in Linux for C++ application

I am using libcurl API for connecting with server. I am seeing a slow performance specially while uploading the data. My application is developed in windows and Linux. However on Windows machine which uses HTTPClient to is always faster than libcurl api. Both the test machine are in same network. Observation says that libcurl API takes double time to upload a file in compare to windows.

We are using curl_multi_perform api. Few of the articles suggested that there may be a issue while doing a lookup for IPV6 address from libcurl API so I addded a flag not to look into IPV6 address still there is no performance improvement.


I am sure that this is not my network issue rather its related to libcurl as I believe fedora will be good as compare to windows OS if we think in direction of OS.


What I am expecting
1: Is the libcurl API obvious slower than the HTTPCLient on windows
2: Is there anything we can do to speedup the connection speed. setting up any flag or etc
3: Any other API which is faster and can replace the libcurl.


Thanks.
Difficult to say what the problem is. And it depends on how much investigating you’re prepared to do.

You could start by taking tcpdump/wireshark traces of both and comparing the timings. What you do next depends on where the time differences are.
Thanks for reply.
Actually I am trying to figure out using "perf" and "tcpdump" on linux machine.
I had put quite lot debugger where it came out that upload time on windows (using httpclient) was lesser than upload time in linux ( libcurl api).

Although I am continuing with profiling tools to get into it more meanwhile wanted to know if there is any obvious suggestion during the use of libcurl and if someone may have faced similar situation.
Use tcpdump to capture the run on Linux, then view it in Wireshark.

Don’t modify your code for the runs, the extra trace will change the timings.

I’m not sure profile tools will help with networking, you just want to compare the network communication and timings first.
Topic archived. No new replies allowed.