LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-19-2008, 06:28 PM   #1
traene
Member
 
Registered: Jan 2005
Distribution: Archlinux, Debian, Centos
Posts: 219

Rep: Reputation: 33
ext3fs defragmentation tool - defrag


The following article on wikipedia is a good introduction to ext3fs http://en.wikipedia.org/wiki/Ext3. It states that defragmentation is not necessary on a ext3fs. However they mention the defrag tool:
http://ck.kolivas.org/apps/defrag/

Its an easy solution which works on any mounted filesytem. It searches the filesystem for files and sort them by decending size. Then it copies each file to a new temporary file and replaces the original file if copying was successful. (I found that even archlinux does a similiar solution this with the pacman-optimize script. pacman uses a filesystem based database. It attempts to relocate these small files into one continuous location.) So this seems like a sane solution for optimizing files on an ext3fs.

My usage scenario is like follows: I have multiple files and touch them every day, effectively rewriting each file by updating some values in these files and appending data to them.
I have a disk with about 400GB and it is about 50% full. Checking the fragmentation with the fragcheck tool states something like this:
40% of files are non-contigous, 8.xx fragemnets avg. per file.

After using the defrag tool fragcheck shows something like:
60% of files are non-contigous, 6.xx fragments avg per file.

This does not seem too bad, the avergage fragments per file are smaller, but more files are fragmented. I did use the defrag tool twice, and it does not seems to speed things up.

Has anybody experience in defragmenting an ext3 Filesystem or with the defrag tool?

Last edited by traene; 01-19-2008 at 06:29 PM.
 
Old 01-19-2008, 06:47 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594Reputation: 3594
Quote:
Originally Posted by traene View Post
I did use the defrag tool twice, and it does not seems to speed things up.
All official and unofficial docs I've read mention defragging extfs isn't necessary, your experiences kinda support that.
 
Old 01-19-2008, 06:57 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,792

Rep: Reputation: 3575Reputation: 3575Reputation: 3575Reputation: 3575Reputation: 3575Reputation: 3575Reputation: 3575Reputation: 3575Reputation: 3575Reputation: 3575Reputation: 3575
There was a thread a while back re a defragger.
Some people seemed to take the need for such a thing in Linux personally, and things got a bit heated. Quick search should find it.
 
Old 01-19-2008, 07:12 PM   #4
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
The thread (I think):
http://www.linuxquestions.org/questi...=lazlow+defrag

Personally I was less offended by ext3 needing defraging, than by certain individuals playing fast and loose with information.

Basically the thread state that Ext3 does fragment but at such a relatively low level that it is not worth doing anything about. The above example seems to bear that out.

Lazlow
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A file-system defragmentation tool on Linux tmcco Linux - Software 148 05-07-2007 10:29 AM
Ext3fs chaos knyght_ryder Linux - Hardware 2 04-10-2006 11:43 PM
defragmentation tool czezz Linux - Software 1 02-04-2005 09:35 AM
HDD Defragmentation tool ? membrax Linux - Software 3 01-22-2003 04:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration