You are not logged in.
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 ?
My Linux Blog - http://TheSmallerBang.wordpress.com/
Offline
My guess is that with low disk space, the database files became fragmented over the hard-drive.
Offline
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 ????
My Linux Blog - http://TheSmallerBang.wordpress.com/
Offline
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
Then is there a defragmentation software for an ext3 file system ?
My Linux Blog - http://TheSmallerBang.wordpress.com/
Offline
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
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 ?
My Linux Blog - http://TheSmallerBang.wordpress.com/
Offline
`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
Then is there a defragmentation software for an ext3 file system ?
pacman -S shake
Offline
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
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 ?
My Linux Blog - http://TheSmallerBang.wordpress.com/
Offline
It does not make much difference with these packages. They work by moving each file to a hopefully more contiguous position.
Offline