LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-01-2008, 05:06 AM   #1
pprs project
LQ Newbie
 
Registered: Aug 2007
Posts: 6

Rep: Reputation: 0
De-fragmentation in Linux


Hi,
Do we need de-fragmentation in ext3 filesystem ?
If yes, why?
If no, why?
 
Old 02-01-2008, 05:22 AM   #2
waelaltaqi
Member
 
Registered: Sep 2005
Location: USA, TN
Distribution: CentOS & Ubuntu for Desktop
Posts: 454

Rep: Reputation: 31
In windows, filesystem gets sluggish by time and a defragmentation is necessary to reorganize the file system efficiently.

In Linux it's a different story. Linux writes on ext3/2 file systems more elegantly were you virtually don't need to defrage.

Within windows users, the myth is that defrage will speed up the system. The truth is that you're running a crappy file system or the crappy OS can't keep up with NTFS.

If computer is suffering from poor performance then i suggest you look at other parts of your system. CPU, Memory Hard Drive seek time and System Bus speed are a lot more important to look at.
Other software tips: look at processes that eat up the system. from the shell type top and check on processes that eat system resources.

There are tools to defrage in Linux but i think they are completely unnecessary. I've been running Ubuntu on my laptop for two years and I'm getting the same great performance since i installed it.

if you have time read this link ... it explains damm well why Linux file system is a lot more reliable.

http://geekblog.oneandoneis2.org/ind..._defragmenting

Last edited by waelaltaqi; 02-01-2008 at 05:26 AM.
 
Old 02-01-2008, 06:21 AM   #3
hand of fate
Member
 
Registered: Nov 2003
Distribution: Mandriva
Posts: 441

Rep: Reputation: 31
Quote:
Originally Posted by waelaltaqi View Post
Within windows users, the myth is that defrage will speed up the system.
Not a myth. If the system is fragmented, defragmenting it does speed up the system.

Quote:
Originally Posted by waelaltaqi View Post
The truth is that you're running a crappy file system or the crappy OS can't keep up with NTFS.
It may be your opinion that the file system and/or OS is "crappy", but that does not make it "the truth". There is a difference between the truth and your personal opinion!

To answer the original question:

If the file system is fragmented then it does need to be defragmented, if not then it doesn't. Fragmentation happens more slowly on a Linux file system than under Windows, but any file system will fragment with repeated use.

With a domestic system it is unlikely that the file system will become fragmented enough to cause significant performance issues, but it is entirely possible.
 
Old 02-01-2008, 07:27 AM   #4
mikieboy
Member
 
Registered: Apr 2004
Location: Warrington, Cheshire, UK
Distribution: Linux Mint 19.1 Xfce
Posts: 555

Rep: Reputation: 33
I've found that I can minimise fragmentation on a Windows box by doing the following:
On installing the OS or if Windows comes pre-installed, run defrag before doing anything else.
Then after each software install run defrag to organise the filesystem.
Set defrag to run automatically on a monthly basis. Ignore any message that says you don't need to defrag and do it anyway.
My Windows partition is not noticeably slower 3 years after I installed Windows XP on it.
And I've found that defragmentation takes less time the more often it is run.
 
Old 02-01-2008, 07:42 AM   #5
waelaltaqi
Member
 
Registered: Sep 2005
Location: USA, TN
Distribution: CentOS & Ubuntu for Desktop
Posts: 454

Rep: Reputation: 31
Quote:
Originally Posted by hand of fate View Post
Not a myth. If the system is fragmented, defragmenting it does speed up the system.

It may be your opinion that the file system and/or OS is "crappy", but that does not make it "the truth". There is a difference between the truth and your personal opinion!
I don't have a personal hatred to windows or microsoft or anybody. It's a proven fact that ext3 file system is much more reliable than NTFS.
Defragmentation in Windows works for a short period then the file system goes back to being defragmented again. The more the operating system runs the more defragmenttion you will need. That was my personal experience with couple of windows 2000 and 2003 servers that have been running for couple of years.
By saying Myth I meant to say that'Windows way' of speeding up the system doesn't necessarily apply in Linux. Linux administrators don't think about defragmenting at all; while windows administrators have too .. .(you know ....scheduled task defrag and all that.... Or a script to defrag 100 machines on the network every two month ... beautiful right?)

Sorry "mikieboy" ... "hand of fate" and I have started a little discussion there .. .but that's part of Linuxquestions.org so bare with us :-)

Last edited by waelaltaqi; 02-01-2008 at 07:47 AM.
 
Old 02-01-2008, 07:53 AM   #6
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 71
Quote:
Originally Posted by waelaltaqi View Post
but that's part of Linuxquestions.org so bare with us :-)
Oh, my! What is it, a nudist beach? I thought I was participating in a Linux discussion forum...

Sorry, couldn't help it.
 
Old 02-01-2008, 08:07 AM   #7
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
If you want to know how fragmented a file is run 'filefrag file' (or use -v option for verbose).

ext3, unlike JFS, XFS, Reiser4, and ext4, does NOT support extents. So, it will likely fragment more than these, but you may not notice it. Nothing like what happens with FAT32 or NTFS (even tho NTFS supports extents).
source:http://en.wikipedia.org/wiki/Extents
 
Old 02-01-2008, 08:09 AM   #8
waelaltaqi
Member
 
Registered: Sep 2005
Location: USA, TN
Distribution: CentOS & Ubuntu for Desktop
Posts: 454

Rep: Reputation: 31
Quote:
Originally Posted by Uncle_Theodore
Oh, my! What is it, a nudist beach? I thought I was participating in a Linux discussion forum...
ya funny ... if you say so ... people like to get into some intense fights around here ... MS vs LINUX and all that good stuff .....
If you say NTFS is crappy people will jump on your back ... well, it's crappy i think ... don't you?

Then if you say MS Exchange is great people will jump on you too ...

So it's more of a strip club man ...

Bare with us people ..... .

Last edited by waelaltaqi; 02-01-2008 at 08:12 AM.
 
Old 02-01-2008, 08:47 AM   #9
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 71
Quote:
Originally Posted by waelaltaqi View Post
So it's more of a strip club man ...
Yeah, sough it seams...

Getting back to the subject, Linux file systems generally do not need defragmenting.
Here's a pretty good explanation of why
http://geekblog.oneandoneis2.org/ind..._defragmenting
 
Old 02-02-2008, 01:29 PM   #10
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Quote:
Originally Posted by Uncle_Theodore View Post
Getting back to the subject, Linux file systems generally do not need defragmenting.
Here's a pretty good explanation of why
http://geekblog.oneandoneis2.org/ind..._defragmenting
Thanks, that is a good explanation.
 
Old 02-09-2008, 08:59 AM   #11
timbothecat
LQ Newbie
 
Registered: Mar 2007
Location: Newcastle, Aus.
Distribution: Ubuntu 8.04 and SuSE 9.2
Posts: 23

Rep: Reputation: 15
Quote:
Originally Posted by waelaltaqi View Post
Sorry "mikieboy" ... "hand of fate" and I have started a little discussion there .. .but that's part of Linuxquestions.org so bare with us :-)
Faith No More had a song on their "King for a day, Fool for a Life Time" album called Sitting Naked in Front of a Computer. I always thought it was about porn but now I'm not so sure...
 
Old 02-09-2008, 12:01 PM   #12
mikieboy
Member
 
Registered: Apr 2004
Location: Warrington, Cheshire, UK
Distribution: Linux Mint 19.1 Xfce
Posts: 555

Rep: Reputation: 33
@ timbothecat:

I think it depends whether you're using a webcam
 
Old 02-09-2008, 12:05 PM   #13
waelaltaqi
Member
 
Registered: Sep 2005
Location: USA, TN
Distribution: CentOS & Ubuntu for Desktop
Posts: 454

Rep: Reputation: 31
See guys ... you just proved that this site is not about Linux.
We always go back to our human roots.
Oh by the way ... i like Ubuntu because it's sexy enough and because it's easy to configure a webcam on it ... ;-)
 
Old 02-09-2008, 12:17 PM   #14
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 71
And I like Slackware 'cause chicks dig it! Holywar, anyone? Just kidding.
BTW, I've never really understood the webcam thing. Don't even have it. If I wanna see a gal I met on the Web, I just ask her out (happened twice so far).
 
Old 02-11-2008, 04:57 AM   #15
DOTT.EVARISTI
Member
 
Registered: Jan 2007
Location: La spezia ( Italia )
Distribution: Fedora 9 amd 64, Gnome,PCLOS 2007,OpenSuse 11 amd 64,Sabayon 3.4,Xp,Vista
Posts: 248

Rep: Reputation: 31
Defrag ? Bad And Useless Beast In Ext3 !

ext3 doesn't need to be defragmented,some other Unix filesystems-i think it should be XFs-do need it but ext3 doesn't.

There are some utility to defrag in Linux too but i suggest you to don't use them,the oldest is defrag but is old and can make your os more unstable and have to do some tweaks in the kernel,another is shipped alongside conlivas patches...

MY SUGGESTION is :defragment ONLY win or Macos,DON'T defragment LINUX with ext3.

Good Luck with Linux !
 
  


Reply

Tags
linux


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
De-fragmentation in Linux pprs project Linux - Software 9 02-02-2008 02:01 PM
fragmentation in linux for IXP2350 proc subraybhat Linux - Kernel 2 11-30-2007 12:06 AM
LXer: Fighting Linux Fragmentation LXer Syndicated Linux News 0 04-28-2006 06:33 PM
Linux filesystems and fragmentation Frogular Linux - General 1 04-29-2005 03:47 AM
why not? - file system fragmentation on Linux akidd Linux - Software 12 05-18-2003 06:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:02 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