You are not logged in.

#1 2008-02-10 12:22:27

ibendiben
Member
Registered: 2007-10-10
Posts: 519
Website

pacman -Sy vs pacman -Syy

I've been curious for this some time now: Why does the 'refresh' process take noticeably longer when all packages are up-to-date?
So I took it for a test:

time -p (sudo pacman -Syy)
:: Synchronizing package databases...
testing                   23,3K   53,0K/s 00:00:00 [---------------------] 100%
core                      23,8K   56,1K/s 00:00:00 [---------------------] 100%
extra                    310,4K  123,0K/s 00:00:03 [---------------------] 100%
community                340,5K  142,7K/s 00:00:02 [---------------------] 100%
local database is up to date
real 22.32
user 0.38
sys 2.39

Immidiately afterwarts I run:

time -p (sudo pacman -Sy)
:: Synchronizing package databases...
testing is up to date
core is up to date
extra is up to date
community is up to date
local database is up to date
real 109.62
user 0.01
sys 0.10

That's 5 times slower!! mad
Now why is this?... and when this isn't hard to answer (which I suspect) why is pacman -Sy there?

Offline

#2 2008-02-10 12:26:18

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,937
Website

Re: pacman -Sy vs pacman -Syy

i think because -Sy compares the files to see if you have the latest and -Syy doesn't compare it, just rewrite it.


Give what you have. To someone, it may be better than you dare to think.
Blog

Offline

#3 2008-02-10 12:28:15

ibendiben
Member
Registered: 2007-10-10
Posts: 519
Website

Re: pacman -Sy vs pacman -Syy

That's what I thought... but there no need for this if you can just refresh everything in less time, is there?

Offline

#4 2008-02-10 13:05:00

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 9,939
Website

Re: pacman -Sy vs pacman -Syy

Well, -Syy is a lot slower on my system.   I don't have testing enabled, though I really can't see that making a difference.  I am reading correctly that it takes just under two minutes on your computer to do a "pacman -Sy".  Does running "pacman-optimize" speed this up any?

allan@arch ~
> time -p (sudo pacman -Syy)
:: Synchronizing package databases...
 core                      23.8K   58.2K/s 00:00:00 [#####################] 100%
 extra                    310.4K   58.9K/s 00:00:05 [#####################] 100%
 community                340.5K   58.5K/s 00:00:06 [#####################] 100%
 local database is up to date
real 15.35
user 0.24
sys 0.88

allan@arch ~
> time -p (sudo pacman -Sy)
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 local database is up to date
real 2.64
user 0.01
sys 0.01

Offline

#5 2008-02-10 13:24:42

ibendiben
Member
Registered: 2007-10-10
Posts: 519
Website

Re: pacman -Sy vs pacman -Syy

sudo pacman-optimize
==> MD5sum'ing the old database...
==> Tar'ing up /var/lib/pacman/...
==> Making and MD5sum'ing the new db...
==> Checking integrity...
==> Putting the new database in place...

==> Finished. Your pacman database has been optimized.
==> For full benefits of pacman-optimize, run 'sync' now.

sync

time -p(sudo pacman -Sy)
:: Synchronizing package databases...
 testing is up to date
 core is up to date
 extra                    310,4K  127,3K/s 00:00:02 [---------------------] 100%
 community is up to date
 local database is up to date
real 73.50
user 0.16
sys 0.77

time -p(sudo pacman -Sy)
:: Synchronizing package databases...
 testing is up to date
 core is up to date
 extra is up to date
 community is up to date
 local database is up to date
real 109.65
user 0.01
sys 0.07

So the question should be: Why is pacman -Sy that slow on my system? wink

Offline

#6 2008-02-10 13:29:33

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 9,939
Website

Re: pacman -Sy vs pacman -Syy

Well, what is your system, filesystem type, free space, fragmentation level, and... well, that should do for a start! big_smile

Offline

#7 2008-02-10 16:17:06

ibendiben
Member
Registered: 2007-10-10
Posts: 519
Website

Re: pacman -Sy vs pacman -Syy

You got a nice command for that? big_smile

Offline

Board footer

Powered by FluxBB