FS#20233 - [pacman 3.4.0-2] pacman -Syu is very slow with v3.4

Attached to Project: Pacman
Opened by John (graysky) - Tuesday, 20 July 2010, 08:50 GMT
Last edited by Allan McRae (Allan) - Wednesday, 10 November 2010, 05:15 GMT
Task Type Bug Report
Category Backend/Core
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Medium
Priority Normal
Reported Version 3.4.0
Due in Version 3.5.0
Due Date Undecided
Percent Complete 100%
Votes 7
Private No

Details

Description: Issuing a pacman -Syu on my system (and others, see the forum post below) is very slow compared to the older version of pacman doing the same operation. The hardrive light is solid on the slow step which pacman reports as ":: Starting full system upgrade..." I have a SATA2 7200 RPM drive which is pretty quick on this system for /var and everything else is on an SSD (X25-M gen2). Under the older version of pacman, this operation took under 5 sec to complete. Now it's consistently taking ~40 sec.

Others are reporting this in the forums: https://bbs.archlinux.org/viewtopic.php?id=100268

Additional info:
* package version(s): pacman 3.4.0-2


Steps to reproduce:

# sync; echo 3 > /proc/sys/vm/drop_caches
# time pacman -Syu
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
:: Starting full system upgrade...
there is nothing to do

real 0m36.192s
user 0m0.390s
sys 0m0.033s
This task depends upon

Closed by  Allan McRae (Allan)
Wednesday, 10 November 2010, 05:15 GMT
Reason for closing:  Fixed
Additional comments about closing:  Lots of git commits culminating in commit 4a8e396a
Comment by Karol Błażewicz (karol) - Tuesday, 20 July 2010, 09:29 GMT
I have a 6yo computer and it takes 5 secs _w/o_ dropping caches. After 'sync; echo 3 > /proc/sys/vm/drop_caches' it takes 17,5 seconds.

Edit: After I run pacman-optimize it takes 95 seconds ... Some optimization alright.
Comment by Vladimir Korsun (amigo) - Tuesday, 20 July 2010, 14:19 GMT
Too much small files in pacman db for searching in. I use little hack:


tunguska% grep pacman /etc/fstab
/var/lib/pacman.db /var/lib/pacman ext4 defaults,loop 0 0

tunguska% ls -lh /var/lib/pacman.db
-rw-r--r-- 1 root root 100M Июл 20 13:56 /var/lib/pacman.db

tunguska% sudo sysctl vm/drop_caches=3
vm.drop_caches = 3

tunguska% time pacman -Ss abra-kadabra
pacman -Ss abra-kadabra 0,50s user 0,76s system 33% cpu 3,788 total

Good luck and have fun.
Comment by David Campbell (Davekong) - Wednesday, 06 October 2010, 18:50 GMT
I just installed Arch on a Acer Aspire One and after doing pacman-optimize and pacman-cage it takes as much as 30s from the time one package is downloaded till the next package starts to download.
Comment by Dan McGee (toofishes) - Friday, 08 October 2010, 13:15 GMT
Time spent downloading packages has nothing to do with the database stuff, or at least should not. I'm not sure this even belongs on this report, but did you see similar behavior before doing pacman-cage?
Comment by David Campbell (Davekong) - Friday, 08 October 2010, 18:19 GMT
Yes, not sure what the exact numbers are, I thought the issues might be related. They both appeared with 3.4 and the time delay is always before the progess bar starts(or would start) for something to download.

Loading...