You are not logged in.

#1 2009-09-17 10:29:24

ermin
Member
Registered: 2009-02-21
Posts: 9

[Solved] Pacman is slow (I don't mean the download speed)

Imagine staring at the following console output for 4 minutes:

# pacman -Su
:: Starting full system upgrade...

The worst is that it causes a lot of I/O, making the whole system noticablly slower.
Same thing when I try to install/remove/query a package.
Running it a second time is faster, so I guess something is cached there.
Pacman-optimize does not help.

What could be the problem here?



(It has nothing to do with download speed. At that point nothing is being downloaded.)

Last edited by ermin (2009-09-18 04:23:41)

Offline

#2 2009-09-17 10:34:24

bangkok_manouel
Member
From: indicates a starting point
Registered: 2005-02-07
Posts: 1,556

Re: [Solved] Pacman is slow (I don't mean the download speed)

what's your file system?

Offline

#3 2009-09-17 10:37:57

ermin
Member
Registered: 2009-02-21
Posts: 9

Re: [Solved] Pacman is slow (I don't mean the download speed)

Filesystem is ext3

Offline

#4 2009-09-18 01:02:35

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

Re: [Solved] Pacman is slow (I don't mean the download speed)

The pacman database is a bunch of scattered files in /var/lib/pacman/, and if your disk is particularly slow and the files aren't laid out well, it can require a lot of random access to pull all of these files into filesystem cache. RAM helps a lot here; it also helps if you aren't maxing out your memory in use by programs and have plenty left for the cache and buffers.

Offline

#5 2009-09-18 02:42:54

V01D
Member
Registered: 2006-07-18
Posts: 128

Re: [Solved] Pacman is slow (I don't mean the download speed)

try deadline scheduler, that will probably help as far as system responsiveness goes

Offline

#6 2009-09-18 04:23:21

ermin
Member
Registered: 2009-02-21
Posts: 9

Re: [Solved] Pacman is slow (I don't mean the download speed)

Thanks.
The deadline I/O scheduler really helped. I didn't have time to test it extensively, but it seems like the whole system is more responsive.

Here and here are links with more information on I/O schedulers and how to switch them.


Edit: Bonus points to the one who can give a simple explanation as to why it helped.

Last edited by ermin (2009-09-18 04:27:10)

Offline

#7 2009-09-18 06:31:23

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: [Solved] Pacman is slow (I don't mean the download speed)

Wasn't there a pacman db optimiser of some sort floating around?

btw: I guess this is a good idea to have /var on a separate partition

Last edited by sand_man (2009-09-18 06:32:47)


neutral

Offline

#8 2009-09-18 18:16:44

quarkup
Member
From: Portugal
Registered: 2008-09-07
Posts: 497
Website

Re: [Solved] Pacman is slow (I don't mean the download speed)

could /var be stored in RAM ** safely ** ?

should I do something like this ?
http://wiki.archlinux.org/index.php/Ramdisk

thanks


If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.

Offline

#9 2009-09-19 02:20:49

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: [Solved] Pacman is slow (I don't mean the download speed)

quarkup wrote:

could /var be stored in RAM ** safely ** ?

should I do something like this ?
http://wiki.archlinux.org/index.php/Ramdisk

thanks

Sure why not.


neutral

Offline

#10 2009-09-22 21:32:48

quarkup
Member
From: Portugal
Registered: 2008-09-07
Posts: 497
Website

Re: [Solved] Pacman is slow (I don't mean the download speed)

k thanks

big_smile


If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.

Offline

#11 2009-09-26 15:58:36

kgas
Member
From: Qatar
Registered: 2008-11-08
Posts: 718

Re: [Solved] Pacman is slow (I don't mean the download speed)

I read nooms method to improve the pacman speed. Also using some download accelerator (XferCommand) will improve the pacman speed. The filesystem as mentioned by bangkok_manouel plays a role. In my experience resierfs is very nice for /var partition.

Offline

#12 2009-09-26 16:18:53

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: [Solved] Pacman is slow (I don't mean the download speed)

I'm also using the "pacman DB in a file" AKA "pacman-cage" method, except I'm using reiserfs on my loopback image rather than plain ext2. You wouldn't think that would work so well, but it really does.

Offline

#13 2009-09-26 16:21:08

ermin
Member
Registered: 2009-02-21
Posts: 9

Re: [Solved] Pacman is slow (I don't mean the download speed)

kgas wrote:

I read nooms method to improve the pacman speed. Also using some download accelerator (XferCommand) will improve the pacman speed. The filesystem as mentioned by bangkok_manouel plays a role. In my experience resierfs is very nice for /var partition.

There is a script to automate the whole process here. It should be a bit more secure than doing it yourself.

Offline

Board footer

Powered by FluxBB