On Thu, Sep 10, 2009 at 6:28 AM, Michael Matz
Hi,
On Thu, 10 Sep 2009, Klaus Kaempf wrote:
* Duncan Mac-Vicar Prett
[Sep 10. 2009 13:05]: ZYpp head (what will be present in 11.2 and SLE SP1) has a policy for this, so it can be switched to download first.
Great ! But how does it download ? All in 'one go' or with a separate http connection for each package ?
iirc, establishing the http connection can take considerable time.
If used correctly curl does all of this for you. If the server allows persistent connections (and most of them do) curl uses that. Don't know what the aria lib is doing. (and that feature might or might not interact with the relocation that download.o.o is doing).
The TCP and HTTP overhead itself is so small as to be nearly free. The presence or absence of persistent (keepalive) connections helps but only at the very extreme - over thousands of downloads worth less than a few seconds in most cases. (That is not to say that it's not a very good idea to use it whenever possible for lots of *other* reasons). Even modest hardware is more than capable of thousands of requests per second - therefore, any latency observed when downloading much be assigned to some other aspect - perhaps the process by which the http connections are initiated (a process fork and exec, or library initialization, etc...) can be blamed. Still, even modest hardware should be capable of forking off and execing wget (as an example) a few dozen times a second. A person experienced in analysis could probably use 'strace -f -tt -T' (and other flags) to get a real good idea as to where zypper/yum are spending their time. My off-the-cuff guess is that the redirection that download.o.o is doing is at least partially to blame. Taking a look at a single request, it appears that d.o.o takes approx 0.29s to issue the redirection. 0.29 times 60 is 18 seconds. My guess is that 0.29 is too low as an average, especially during periods of high load. In the case of downloading a *small* .rpm (approx 18K or so) fulfilling the request actually took about 0.03s whereas the redirect was 10 times that. Perhaps it would not be unreasonable to consider looking at the 302 redirection mechanism that is in place and try to find some way to improve the response time. -- Jon -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org