You are not logged in.

#1 2009-11-18 16:19:38

Matthew T.
Member
Registered: 2009-11-18
Posts: 10

excessive fragmentation?

Fsck shows 9% noncontiguous files in my /boot partition (ext2) and 6% noncontiguous in /home (ext4). I've had Arch on my laptop for about a week. Is this amount of fragmentation normal?

Offline

#2 2009-11-18 17:48:38

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: excessive fragmentation?

If its your boot-partition - I most certainly would not lose any sleep over it! (It is probably just some few hundred MB - at most - in size). Otherwise - extX is _not_ ntfs - generally speaking, you never have to worry about fragmentation on a linux-machine.
It's really the same type of question one gets about memory: "Something is wrong - my computer uses all available memory!"
Well, memory not used is memory wasted! In such a case - its probably mostly cached and can be given away by anything/anyone wanting some.

Last edited by perbh (2009-11-18 17:50:42)

Offline

#3 2009-11-18 17:58:37

MadTux
Member
Registered: 2009-09-20
Posts: 553

Re: excessive fragmentation?

There are two types of fragmentation, i.e. internal and external. Internal fragmentation refers to the fact that a file system uses specific sizes for a block, say 4KB, so if you have a file which is only 1KB in size, it will be stored in one 4KB block, therefore wasting 3KB of the block. This can't really be avoided.

External fragmentation is when the files are not layed out continuously, i.e. spread over different blocks which can be far apart from each others. Thus it takes the disk head more time to collect all pieces together and reconstruct the file.

Ext4 is better with respect to fragmentation than ext3, but there is currently no tool to defragment ext4, as far as I know. But I really haven't heard anything about fragmentation being a problem on Linux. So I wouldn't be too worried about it.

Offline

#4 2009-11-18 19:39:55

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: excessive fragmentation?

perbh, while linux filesystems generally fragment less that FAT and probably NTFS, it's a misconception that one doesn't have to worry fragmentation - it always impedes performance somehow.

Matthew, I wouldn't worry about such levels of fragmentation. Ext4 supports online defragmentation with 2.6.31 kernels, userspace component for it isn't readily available yet, as far as I know; if you want, I can send it to you.

Offline

#5 2009-11-18 19:43:46

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: excessive fragmentation?

lucke wrote:

perbh, while linux filesystems generally fragment less that FAT and probably NTFS, it's a misconception that one doesn't have to worry fragmentation - it always impedes performance somehow.

Matthew, I wouldn't worry about such levels of fragmentation. Ext4 supports online defragmentation with 2.6.31 kernels, userspace component for it isn't readily available yet, as far as I know; if you want, I can send it to you.

It would not matter for a 'normal' user. If you have serious disk-activity, I agree. Personally I have never had the need to defrag a linux disk (and I have done some voluminous disk work)

Offline

#6 2009-11-19 00:52:12

Matthew T.
Member
Registered: 2009-11-18
Posts: 10

Re: excessive fragmentation?

Now that I'm back in front of my Arch machine, I can give specifics.

My /boot partion is 99 MB, 12 of which have been used. My /home is 135 GB, 3.1 of which have been used. I was wondering because I ran openSUSE 11.1 for almost a year on another machine and only got about 3.5% fragmentation on a 250 GB /home with ext3. I'm not worried, just curious.

Thanks for your offer, lucke, but I'll pass for now.

Offline

Board footer

Powered by FluxBB