From: Mika Fischer <hidden> Date: 2016-06-15 22:52:20
Hi,
I have an apache server that serves git repositories over https. I
have the problem that git is very slow when accessing it, as in 3
seconds for a "git pull" that does nothing.
I tracked the problem down to git sleeping for 50ms using select from
time to time while downloading the response of the server. In my case
this really hurts performance (see attached strace). However, with a
different https server things work quite fine.
If I remove the select in http.c:673 (in run_active_slot), then things
are fast also with my server.
So my questions are:
1) What's the purpose of the select in http.c:673? Can it be removed?
2) If it serves a useful purpose, what can be the reason that it hurts
performance so much in my case?
Best regards,
Mika Fischer
From: Daniel Stenberg <hidden> Date: 2016-06-15 22:52:20
On Fri, 28 Oct 2011, Mika Fischer wrote:
1) What's the purpose of the select in http.c:673? Can it be removed?
2) If it serves a useful purpose, what can be the reason that it hurts
performance so much in my case?
The purpose must be to avoid busy-looping in case there's nothing to read.
It should probably use curl_multi_fdset [1] to get a decent set to wait for
instead so that it'll return fast if there is pending data. The timeout for
select can in fact also get extended with the use of curl_multi_timeout [2].
1 = http://curl.haxx.se/libcurl/c/curl_multi_fdset.html
2 = http://curl.haxx.se/libcurl/c/curl_multi_timeout.html
--
/ daniel.haxx.se
From: Gelonida N <hidden> Date: 2016-06-15 22:52:20
On 10/28/2011 05:28 PM, Mika Fischer wrote:
Hi,
I have an apache server that serves git repositories over https. I
have the problem that git is very slow when accessing it, as in 3
seconds for a "git pull" that does nothing.
I tracked the problem down to git sleeping for 50ms using select from
time to time while downloading the response of the server. In my case
this really hurts performance (see attached strace). However, with a
different https server things work quite fine.
If I remove the select in http.c:673 (in run_active_slot), then things
are fast also with my server.
So my questions are:
1) What's the purpose of the select in http.c:673? Can it be removed?
2) If it serves a useful purpose, what can be the reason that it hurts
performance so much in my case?
Do you edperience the same delay if you ssh to the server?
If yes, then try to add following line to the slow https server's config
file.
UseDNS no
The config file should have a name similair to
/etc/ssh/sshd_config
Is it getting any faster?
From: Mika Fischer <hidden> Date: 2016-06-15 22:52:21
Thanks for the pointer. Doing it this way fixes things for me. I'll
send a patch soon. I'd appreciate it if you could check it quicky.
Best,
Mika
On Fri, Oct 28, 2011 at 20:28, Daniel Stenberg [off-list ref] wrote:
On Fri, 28 Oct 2011, Mika Fischer wrote:
quoted
1) What's the purpose of the select in http.c:673? Can it be removed?
2) If it serves a useful purpose, what can be the reason that it hurts
performance so much in my case?
The purpose must be to avoid busy-looping in case there's nothing to read.
It should probably use curl_multi_fdset [1] to get a decent set to wait for
instead so that it'll return fast if there is pending data. The timeout for
select can in fact also get extended with the use of curl_multi_timeout [2].
1 = http://curl.haxx.se/libcurl/c/curl_multi_fdset.html
2 = http://curl.haxx.se/libcurl/c/curl_multi_timeout.html
--
/ daniel.haxx.se