LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Closed Thread
  Search this Thread
Old 02-01-2008, 12:07 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, 12:38 AM   #2
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
No. Because it does not tend to fragment.

It will fragment, and can fragment badly, if the drive is nearly full (above 95%) and has lots of files on it that are changed frequently. But that is about the only time that ext3 will fragment to any substantial degree.
 
Old 02-01-2008, 03:18 AM   #3
tailender
LQ Newbie
 
Registered: Oct 2006
Posts: 27

Rep: Reputation: 15
http://geekblog.oneandoneis2.org/ind..._defragmenting
Its explained pretty simple in this site
 
Old 02-01-2008, 03:20 AM   #4
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
ext3 is ext2 with a journal . Here is a link (german) to an explanation of the mechanisms of fragmentation and why it is not significant in ext2 (as the fore poster already wrote)

http://de.opensuse.org/SDB:EXT2_-_Fragmentierung
 
Old 02-01-2008, 09:03 PM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,636
Blog Entries: 4

Rep: Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933Reputation: 3933
For that matter, "defragmenting" is no longer an issue with Windows' modern filesystems, either!

Curiously, many off-the-shelf drives when you purchase them have been pre-formatted ... with an MS-DOS-era (FAT) filesystem! (I guess the manufacturers do this to keep technical-support costs down, so they don't have to explain what "formatting" means. And there is a certain amount of wisdom in that... )

{Note: "FAT" = File Allocation Table. Referring to the original filesystem format for Microsoft MS-DOS.}

The bottom-line is simple: when you buy a new drive and put it into service, whether on Windows or on Linux or on OS/X, format it. This will install a (blank...) filesystem with the operational characteristics that you need. Any operating-system will have a recommended default ("ext3" is a fine choice for Linux).

All of these filesystems will never require "defragmenting."

Modern systems also routinely provide the concept of journaling, which simply means that if your computer "crashes," it doesn't have to verify the hard-drive on restart: the journal allows the state of the hard-drive to be instantly recovered. ("ext3" adds this capability to "ext2" without change to the disk format... it's upward-compatible and therefore definitely essential.)

All modern operating systems (including Windows, and OS/X, and Linux) provide for the concept of "installable file systems." In other words, they are not limited to just one arrangement of organizing a hard-drive into files and directories, but are capable of supporting one or several disk formats (on different disk volumes...) at the same time. The FAT-based formats will probably be with us until the end of time if only for backward-compatibility reasons, but there is no viable reason to use them for new drives today.

I recently bought a Windows-based laptop and was quite stunned to see that the system had been formatted with a moderate-sized NTFS partition for the main system ... and a large FAT(!!) partition! Since I had possessed the wisdom of also purchasing a Windows-XP retail DVD-ROM at time of purchase, I promptly reformatted the drive ... all of it ... and did a custom-install of XP-SP2 on the single NTFS partition that this poor laptop obviously always should have had. {Never assume that computer-vendors make intelligent decisions. They know they might be selling a computer to your grandmother, and they base a lot of their plans on "making darn sure that 'your grandmother' won't call for technical support!" Yeah, retail margins are that thin.}

Last edited by sundialsvcs; 02-01-2008 at 09:05 PM.
 
Old 02-01-2008, 10:36 PM   #6
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
You might want to read the section on NTFS fragmentation in this link:

http://www.digit-life.com/articles/ntfs/

While EXT3 does fragment it is at such a low level that defrag is pointless (assuming the drive is not over 85% capacity).
 
Old 02-01-2008, 11:06 PM   #7
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
Quote:
All of these filesystems will never require "defragmenting."
NTFS is actually pretty bad about fragmenting.

It does indeed seem to be a bit better about allocating files across the space of the HD than FAT is, but it fragments badly anyway, even on partitions that are only half full. I have to periodically defragment my NTFS partitions (I have 6 of them on this workstation, all used by my Win2K installations in VMWare), and they do keep fragmenting as I work with them. The way Windows handles its swapfile - and those gawdawful registry hives, which get big and are constantly being changed - encourage the fragmentation.
 
Old 02-02-2008, 08:33 AM   #8
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
lazlow,
Do you have any links to NTFS info. that is written in English that is easier to read? I tried that one you posted, but couldn't get through it.
 
Old 02-02-2008, 11:40 AM   #9
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
Rick

Just do a google search on ntfs fragmentation. It is a complex topic so almost all the discussions of it are going to be of a technical nature.
 
Old 02-02-2008, 02:01 PM   #10
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

Discussion continues here.
 
  


Closed Thread

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
fragmentation in linux for IXP2350 proc subraybhat Linux - Kernel 2 11-30-2007 12:06 AM
Fragmentation Information on Enterprise Linux Morpheus Linux - Server 4 04-29-2007 08:19 AM
Linux filesystems and fragmentation Frogular Linux - General 1 04-29-2005 03:47 AM
Does Slackware/Linux suffer from fragmentation? CodeWarrior Slackware 2 07-27-2003 09:30 PM
why not? - file system fragmentation on Linux akidd Linux - Software 12 05-18-2003 06:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:32 AM.

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