Historical bug tracker for the Pacman package manager.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
FS#17388 - pacman waits ~5 seconds after each download
Attached to Project:
Pacman
Opened by Mark (markg85) - Saturday, 05 December 2009, 01:10 GMT
Last edited by Dan McGee (toofishes) - Saturday, 06 March 2010, 05:14 GMT
Opened by Mark (markg85) - Saturday, 05 December 2009, 01:10 GMT
Last edited by Dan McGee (toofishes) - Saturday, 06 March 2010, 05:14 GMT
|
DetailsIn the last few days i installed archlinux twice and installing all of kde (pacman -S kde) took extremely long. Not because of my download speed (2 megabytes/second) but because pacman somehow has the urge to wait 5 seconds (just waiting.. no message or anything). Just a plain 5 second wait for any download. Few kilobytes.. wait. dozens of megabytes.. wait and when installing all of kde all that waiting adds up quite some time.
Side note. besides getting rid of this forced wait it might be handy to thread the downloads. So download 8 files simultain. I'm not talking about using 8 threads to download one file faster but again to download 8 files at the same time. The number 8 should be changeble in pacman.conf ^_^ |
This task depends upon
Closed by Dan McGee (toofishes)
Saturday, 06 March 2010, 05:14 GMT
Reason for closing: Not a bug
Additional comments about closing: User config issue
Saturday, 06 March 2010, 05:14 GMT
Reason for closing: Not a bug
Additional comments about closing: User config issue
Please research beforehand or tell us what you have tried.
And this used to be just fine with no delays some months ago when i installed another pc.. and now it's just slow.
And that is also the case when i install archlinux from the 2009.08 net image so it can't be part of my setup because that image is making my setup.
I also did select the best possible mirror for my location (the netherlands) to nluug (or surfnet or leaseweb) all with the same delay between file transfers.
sorry for not telling what i tried.. i simply forgot to mention it.
If we can't find a sane solution for this i'm willing to dig in the code and find this nasty issue. I would like a pointer to the file that is actually downloading packages.. (sync.c and sync.h?) and the actual line that is downloading..
but lets first just try to find the issue without diving in c code.
Try the following:
1) Change your xfer command in /etc/pacman.conf to 'XferCommand = /usr/bin/wget -4 --passive-ftp -c -O %o %u'
2) Disable ipv6 in the kernel if you dont need it. in /etc/modprobe.d/modprobe.conf, add 'alias net-pf-10 off' and reboot
If either of these solve the problem, its IPV6 related. I always use 'alias net-pf-10 off' since i do not use IPV6, and it causes all sorts of delays in DNS lookups.
Please confirm or deny ...
So, i tried : XferCommand = /usr/bin/wget -4 --passive-ftp -c -O %o %u as suggested. While it looks horrible it certainly is working without delays :)
I didn't try the ipv6 yet.
But since you said: "If either of these solve the problem, its IPV6 related." so i guess it's ipv6 related...
Does that mean that pacman is not working correctly when ipv6 is "installed"? Just for the record. this all just worked fine before. some update somewhere "broke" it but i have no clue which one because my system has roughly updated every package since the issue first happened.
@Robert Lewis: confirmed
I also noticed that something during an update changed the behavior of this on arch, but i am not sure what. I have just always followed these wiki instructions:
http://wiki.archlinux.org/index.php/IPv6_-_Disabling_the_Module
The wiki there mentions that 'Many don't require the features, and may benefit from added performance (many programs will query IPv6 addresses first, unaware that you don't have an IPv6 connection)'. My only guess on this one is that IPV6 enabled applications will 'timeout' when requesting traffic through IPV6, then revert to IPV4.
I do hate to use this option to disable ipv6 but i guess i will have to if i don't want those damned 5 second waits!
I do feel like ipv6 is (or should be) the future and if an app is not working correctly it should simply be fixed. In this case You and I just don't know where the real issue is only that we can bypass it by disabling ipv6.
Perhaps the issue is in the downloading code of pacman? (didn't look t it)
Why can't the lookup stuff do ipv4 and ipv6 simultaneously and use the one that responds (drop the other one)..
Oh, just notice something. I used this mirror: ftp://ftp.surfnet.nl/pub/os/Linux/distr/archlinux/$repo/os/x86_64 which is always fast for me.
on this http://wiki.archlinux.org/index.php/Mirrors#IPv6-ready_mirrors page that mirror is marked as ipv6 ready! So, it should work! without delays!
Note: i tried a range of mirrors over the globe and all had the same issue.
"By default, glibc performs IPv4 and IPv6 lookups in parallel since +version 2.9 (though many distribution packages of glibc are known +to disable that behavior in this version). Some appliance DNS servers +cannot handle these queries properly and make the requests time out. +This option disables the behavior and makes glibc perform the IPv6 +and IPv4 requests sequentially (at the cost of some slowdown of the +resolving process)."
In order to "fix" this:
Add to /etc/resolv.conf.head (or create it if it doesn't exist):
options single-request
Of course, if it does not work revert your changes :)
Command used:
wget http://aur.archlinux.org/packages/alfresco-community-tomcat/alfresco-community-tomcat.tar.gz
Just a file to test.