You are not logged in.

#1 2010-07-01 15:46:26

Radioactiveman
Member
From: Germany
Registered: 2010-05-13
Posts: 388

pacman -Syu with 3.4 is very slow

Hi,
I've got a problem with Pacman 3.4.0-2, -Syu is very slow ...
:: Starting full system upgrade... takes ~ 60 seconds to complete.

sudo 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

If I executed -Syu onetime and do it again, it takes <5 seconds, after a reboot it's the same as before (60s).
I tried pacman-optimize and different mirrors, I also deleted the cache, but it's still slow. What could be the problem? Pacman 3.3 was so fast ...

Offline

#2 2010-07-01 15:56:12

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,543

Re: pacman -Syu with 3.4 is very slow

I have noticed the same thing.  If I run top at the same time as -Syu, there is no abnormal cpu load to account for the delay.

Offline

#3 2010-07-01 16:36:28

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: pacman -Syu with 3.4 is very slow

I'm also using Pacman 3.4.0-2 and it's just as fast / slow as the 3.3.

Last edited by karol (2010-07-01 16:38:47)

Offline

#4 2010-07-01 17:17:00

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: pacman -Syu with 3.4 is very slow

no difference in speed at this end either


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#5 2010-07-01 17:40:09

TigTex
Member
From: Portugal
Registered: 2008-06-19
Posts: 301

Re: pacman -Syu with 3.4 is very slow

for me pacman 3.4 is faster.

Try pacman-cage from AUR. It helps A LOT.


.::. TigTex @ Portugal .::.

Offline

#6 2010-07-01 20:23:01

bananaoomarang
Member
Registered: 2009-10-29
Posts: 180

Re: pacman -Syu with 3.4 is very slow

Try using Clyde. From my experience it's a whole lot faster.

Offline

#7 2010-07-01 21:58:04

Radioactiveman
Member
From: Germany
Registered: 2010-05-13
Posts: 388

Re: pacman -Syu with 3.4 is very slow

I've tested pacman-cage, it's really fast but I asked what could be wrong with pacman and not how to avoid the problem. wink
Do the developers know the issue? I think it's not really reproduceable but skunktrader has the same regression of speed.

Offline

#8 2010-07-02 00:09:54

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,400
Website

Re: pacman -Syu with 3.4 is very slow

Where do you see the slow down?   Extracting the downloaded repos is much, much, much faster in 3.4 with a -Sy.

Offline

#9 2010-07-02 00:17:13

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,964
Website

Re: pacman -Syu with 3.4 is very slow

I have got the same problem. The dependency resolution takes a lot of io load and takes about minutes. (cpu load is zero during that...at first I even thought it was in an infinite loop)

Is there a way to get some output what pacman is actually doing here? (debug output does not show anything)

Offline

#10 2010-07-02 01:48:23

TigTex
Member
From: Portugal
Registered: 2008-06-19
Posts: 301

Re: pacman -Syu with 3.4 is very slow

Pacman is only updating your local repo (extracting the db). The activity is all in your HDD. If it's slow, maybe you should run pacman-optimize and do pacman -Syyu just to see if it speeds up a bit.If you have a slow hdd, try pacman-cage. Pacman is getting slow because "every day" there are more packages...


.::. TigTex @ Portugal .::.

Offline

#11 2010-07-02 02:15:29

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: pacman -Syu with 3.4 is very slow

Pacman 3.3 took a lot of time after each repo package list download. Pacman 3.4 seems to have moved that processing time after ":: Starting full system upgrade..." is displayed. Takes a very long time here too. pacman-optimize doesn't help, or maybe only just right after it's done...

BTW it's strange because during this processing period, my cpu load is at 100%, but XFCE's cpufreq monitor tells me it is stuck at 600 MHZ, which is the lowest frequency of my processor... It should be going up if the load is more than 80%... (in conservative mode)

Edit: it doesn't take as much time if I have already run pacman -Syu since last boot, I think...

Edit2: this is on an ext3 partition, laptop HD about 30-60 MB/s, nothing special installed (no pacman-cage, clyde, whatever.)
Yesterday I did a pacman-optimize and a pacman -Syy. Today pacman -Syu "Starting full system upgrade" took 95 s to tell me there was nothing to upgrade. During that time, cpu load is at 100% (kinda, as explained above) and there is a lot of HD activity.

Last edited by stqn (2010-07-02 19:34:30)

Offline

#12 2010-07-02 03:02:57

TigTex
Member
From: Portugal
Registered: 2008-06-19
Posts: 301

Re: pacman -Syu with 3.4 is very slow

It takes less time the 2nd and consecutive times you run pacman -Syu because the local database is already cached. Pacman 3.4 is faster than 3.3 on my mediacenter pc, on my laptop i have pacman-cage and I didn't noticed any diference (it takes only 2 seconds reading the db).

The performance change was with pacman -Sy. Pacman -Su still has to read everything so it's still slow like older versions.

Diferent filesystems makes pacman faster/slower.

Last edited by TigTex (2010-07-02 03:03:44)


.::. TigTex @ Portugal .::.

Offline

#13 2010-07-02 16:25:56

Radioactiveman
Member
From: Germany
Registered: 2010-05-13
Posts: 388

Re: pacman -Syu with 3.4 is very slow

Allan wrote:

Where do you see the slow down?   Extracting the downloaded repos is much, much, much faster in 3.4 with a -Sy.

As already said,':: Starting full system upgrade...' needs that long, not the extracting.

Offline

#14 2010-07-02 16:33:35

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,964
Website

Re: pacman -Syu with 3.4 is very slow

I just checked. a cold -Syu takes 45s (no updates available). My ext4 on raid5 reads about 200MByte/s. On my old notebook with quite slow hd this takes forever.

Offline

#15 2010-07-02 17:21:48

maxi_jac
Member
From: France
Registered: 2008-08-02
Posts: 72

Re: pacman -Syu with 3.4 is very slow

It also seems way longer when calculating the packages that needs to be updated with pacman 3.4 than it was with 3.3 for me.

Offline

#16 2010-07-02 17:33:33

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: pacman -Syu with 3.4 is very slow

Just ran pacman -Syu and took 23 seconds to reply with no upgrade.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#17 2010-07-02 22:19:35

toofishes
Developer
From: Chicago, IL
Registered: 2006-06-06
Posts: 602
Website

Re: pacman -Syu with 3.4 is very slow

maxi_jac wrote:

It also seems way longer when calculating the packages that needs to be updated with pacman 3.4 than it was with 3.3 for me.

The tradeoff with only doing partial extraction of the database is now the database gets fragmented across your filesystem a lot quicker than it did before. If you are a compulsive -Syu-er, you should 1) fix your habit 2) run pacman-optimize every 10 -Syu operations or so because the database is going to fragment.

Until we move to a single file solution, any time we have to wait on the disk we are going to have a slow grind.

Offline

#18 2010-07-02 23:24:51

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,964
Website

Re: pacman -Syu with 3.4 is very slow

Running pacman-optimize does not improve anything for me.

Offline

#19 2010-07-03 03:26:55

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: pacman -Syu with 3.4 is very slow

Radioactiveman wrote:

Hi,
I've got a problem with Pacman 3.4.0-2, -Syu is very slow ...
:: Starting full system upgrade... takes ~ 60 seconds to complete.

sudo 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

If I executed -Syu onetime and do it again, it takes <5 seconds, after a reboot it's the same as before (60s).
I tried pacman-optimize and different mirrors, I also deleted the cache, but it's still slow. What could be the problem? Pacman 3.3 was so fast ...

This is not new (at least for me) with pacman 3.4 but the explanation that pacman is slow on the first time is the following. Pacman has to read a lot of files (I have 9129 files in the sync database /var/lib/pacman sync). Accessing a lot of file take time. The second time you use pacman the kernel has cached the cont of the file in memory so that pacman does not have to read these on the disk, so that it is much faster. The same behaviour can be observed by a command like:

find / -name <some-file-name>

Slow at first, very fast the second time.

Offline

#20 2010-07-03 03:43:47

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,400
Website

Re: pacman -Syu with 3.4 is very slow

This would be the way to fix this issue:
http://wiki.archlinux.org/index.php/Pac … map#Tar-DB
Then the "files" would be all in one place and a lot quicker to read.  Patches welcome and all...

Offline

#21 2010-07-03 07:19:14

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,964
Website

Re: pacman -Syu with 3.4 is very slow

I think we are mixing things up here. At least in my case I know about the issue with all the small files pacman has to read. The point it that 3.4 seems to be a lot slower when calculating deps or searching for possible updates. So it either does quite a lot more chekcs which require more reads for example.

Offline

#22 2010-07-03 08:07:19

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,400
Website

Re: pacman -Syu with 3.4 is very slow

Just to clarify.  There are no more checks done in pacman-3.4, just the area where all the small files are read has been effectively moved.

Now the database extraction only extracts the needed db files for new/updated packages onto your system.  This speeds that up a lot and if you have no packages to update, an "-Syu" will be much faster.   

A side effect of this is that now the db files for the packages that have not had an update are not in your systems cache and the dependency calculations need to read them in from scratch.  This is the slow-down you have noticed

Offline

#23 2010-07-03 12:25:09

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,964
Website

Re: pacman -Syu with 3.4 is very slow

I think I get it now. So previous versions extracted the whole db which also added those files into the cache? The "putting everything into a tar" approach might indeed help here.

Offline

#24 2010-07-03 15:31:11

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: pacman -Syu with 3.4 is very slow

Allan wrote:

Now the database extraction only extracts the needed db files for new/updated packages onto your system.  This speeds that up a lot and if you have no packages to update, an "-Syu" will be much faster.

"pacman -Syu" is much slower than before, here. 95 seconds to tell me there is nothing to upgrade... (and that was the day after I did pacman -Syy and pacman-optimize.) (I've edited my post above to add this information.)

pacman -S non-existing-package also takes about the same time, which is more annoying.

Offline

#25 2010-07-03 16:27:53

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: pacman -Syu with 3.4 is very slow

Allan:

Performed ..pacman-optimize yesterday...pacman -3.4.2-0

Today have this time report:

[root@n6re ~]# 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...
warning: vlc: local (1.1.0-1) is newer than extra (1.0.6-8)
there is nothing to do

real    0m2.010s
user    0m0.260s
sys     0m0.180s
[root@n6re ~]#
This indicates a problem I have been experiencing...no upgrades for two weeks!

Vlc was built from abs extra and installed via pacman -U under the new pacman package.

I am not sure what the statement "vlc package is newer than extra" means.  Is it my listing of extra or the package in archlinux repo that is referenced.

Perhaps this conflict prevents any upgrade of other packages?

I read that pacman -U operates in a new way with the new pacman package.  I note that it seems to download depends whether they already exist in file or not such as a local cachedir.

Is there a problem in the latest pacman related to the use of ..pacman -U with abs generated packages?

A previous post I made in this thread indicated 23 secs for ...pacman -Syu with same message resulting.  Thus, pacman-optimize was effective in reducing the time.  But I still cannot upgrade with Syu.

Last edited by lilsirecho (2010-07-03 16:28:22)


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

Board footer

Powered by FluxBB