You are not logged in.

#1 2009-01-29 03:31:56

MetalheadGautham
Member
From: Bangalore, India
Registered: 2008-07-27
Posts: 143
Website

Pacman Speed Issue - The Reason ???

I initially had a severe speed issue with pacman package manager. At first, when I had installed archlinux, pacman worked smooth as butter. But then, in the past month or two, it became increasingly slow. A simple sudo pacman -Syu took over 2 minutes to execute and go to the [Y/n] menu.

I asked in this forums the question several times but got no good reply. Many said its an issue faced when using EXT2 file system. I was adviced to use EXT3 which I already use. This only made me more confused.

A few days back, I noticed that I had alarmingly less free disc space on my / partition. I checked /var/cache/pacman/ and noticed that pacman cache occupied almost 3.7GB, in my 10GB / partition. So I decided to do a sudo pacman -Sc -KeepCurrent and freed up 2GB of space.

My harddisc configuration is: ~10GB for /, ~10GB for home and ~496MB for swap.

Since then, pacman speeds have returned to normal. A search for a non-existant package no longer takes over a minute to execute - its done in less than a handful of seconds.

So my question is, WHY is pacman's speed linked to free space available in the root partition ?

I know for one that pacman configuration is stored in a thousand tiny files.
I also know that access times are great in EXT3 because its a Journalising File System.
Would low disc space cause journal to be not written or something like that ?

Offline

#2 2009-01-29 03:40:50

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

Re: Pacman Speed Issue - The Reason ???

My guess is that with low disk space, the database files became fragmented over the hard-drive.

Offline

#3 2009-01-29 03:55:05

MetalheadGautham
Member
From: Bangalore, India
Registered: 2008-07-27
Posts: 143
Website

Re: Pacman Speed Issue - The Reason ???

Then how is the condition different when the disc space comes back ?
Does EXT3 have some automatic defragmentation algo ? I think not.
Isn't journalising supposed to PREVENT the ill effects of fragmentation ?
And is 500mb free space really THAT low for database files ????

Offline

#4 2009-01-29 04:13:21

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 440

Re: Pacman Speed Issue - The Reason ???

MetalheadGautham wrote:

Isn't journalising supposed to PREVENT the ill effects of fragmentation ?

That's just an idea propagated by fanboys.  The rate/severity of fragmentation will vary, but any filesystem will become fragmented over time.  Regardless of what you use, optimal file allocation becomes increasingly impossible as you approach 0 space.

Offline

#5 2009-01-29 04:23:02

MetalheadGautham
Member
From: Bangalore, India
Registered: 2008-07-27
Posts: 143
Website

Re: Pacman Speed Issue - The Reason ???

Then is there a defragmentation software for an ext3 file system ?

Offline

#6 2009-01-29 04:24:03

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

Re: Pacman Speed Issue - The Reason ???

I guess you updated you pacman database (pacman -Sy)  which would have rewritten the pacman database to a nice contiguous block.  Although, it would have done nothing to your local database (for your installed packages).

Offline

#7 2009-01-29 04:44:07

MetalheadGautham
Member
From: Bangalore, India
Registered: 2008-07-27
Posts: 143
Website

Re: Pacman Speed Issue - The Reason ???

Thats what I think too.

So is there any way to defragment linux ? OR is it easier to backup configuration files and local repository and reinstall archlinux and restore config files and copy back local cache to pacman cache ?

Offline

#8 2009-01-30 15:32:55

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Pacman Speed Issue - The Reason ???

`pacman-optimize` will rewrite your local db to a continuis block (if it's able too, as noted, there has to bee a large enough are free)

For the question about defrag, there exist some tools to defrag ext3 but they are 3.rd party. xfs has a official defrag tool, and ext4 is getting one 'soon' (maby as soon as with kernel .29)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#9 2009-01-30 20:43:34

Wintervenom
Member
Registered: 2008-08-20
Posts: 1,011

Re: Pacman Speed Issue - The Reason ???

MetalheadGautham wrote:

Then is there a defragmentation software for an ext3 file system ?

pacman -S shake

Offline

#10 2009-01-31 10:59:29

Zibi1981
Member
From: Poland
Registered: 2008-01-31
Posts: 644

Re: Pacman Speed Issue - The Reason ???

There's also FS-independent fiDefrag.

Off-topic (slightly): when I was starting my adventure with Linux somewhat two years ago everyone claimed that the filesystems it utilizes didn't need a defragmenting tool. I was very suspicious about that, although I'm not a computer geek. Seems I was right. Maybe JFS or Ext3 are more resistant to fragmentation than NTFS, but they eventually require defragmentation.


"... being a Linux user is sort of like living in a house inhabited by a large family of carpenters and architects. Every morning when you wake up, the house is a little different. Maybe there is a new turret, or some walls have moved. Or perhaps someone has temporarily removed the floor under your bed."

MSI Raider GE78HX 13VI-032PL

Offline

#11 2009-02-01 11:13:50

MetalheadGautham
Member
From: Bangalore, India
Registered: 2008-07-27
Posts: 143
Website

Re: Pacman Speed Issue - The Reason ???

I personally feel it would be safer to defragment a partition when its not mounted.
So would it be better to use "shake" from a live Boot ?
And does archlinux have a flash drive optimised boot mode ?
Or is there any defrag software on Knoppix 6.0 Live CD ?

Offline

#12 2009-02-01 11:23:02

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

Re: Pacman Speed Issue - The Reason ???

It does not make much difference with these packages.  They work by moving each file to a hopefully more contiguous position.

Offline

Board footer

Powered by FluxBB