LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-30-2005, 12:25 PM   #1
spaceballs
Member
 
Registered: Jan 2005
Location: Dallas, TX
Distribution: Slackware-current
Posts: 248

Rep: Reputation: 30
Defrag?


For a while, I was a windows system administrator. Don't even start with me, it was terrible.

These systems must be defragged once (twice) a week, or they really start operating poorly.

I have been using linux on a few different systems for three-four years, and have not had any issues with this.

Why does linux not need to be defragmented? Or does it need to be, and how do I do it?
 
Old 03-30-2005, 12:32 PM   #2
linmith
Member
 
Registered: Oct 2004
Location: Scotland
Distribution: Ubuntu
Posts: 105

Rep: Reputation: 15
As far as I know you don't have to defragment linux, I think I remember reading that somewhere...but don't quote me on that
 
Old 03-30-2005, 12:45 PM   #3
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
The most of linux filesystems (if not all) have built-in defragment procedure.
So when you rm or cp a file, you actually do a defrag at the same time
 
Old 03-30-2005, 12:46 PM   #4
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Rep: Reputation: 45
That's true, but i've read that you could have slight fragmentation if you frequently fill up your hard drive...
 
Old 03-30-2005, 12:49 PM   #5
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
This is obvious as the filesystem has not enough room to do defrag block manipulation if the partition is full of data (I think it need like 5/10% of free space)
 
Old 03-30-2005, 01:10 PM   #6
spaceballs
Member
 
Registered: Jan 2005
Location: Dallas, TX
Distribution: Slackware-current
Posts: 248

Original Poster
Rep: Reputation: 30
I guess my real question is why does windows fragment its hard drives, and why does linux not?
 
Old 03-30-2005, 01:29 PM   #7
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
look at:
http://www.linux-sxs.org/housekeeping/frag.html

They tell about ext2 but you can extand it to other filesystems
 
Old 03-30-2005, 01:34 PM   #8
rshaw
Senior Member
 
Registered: Apr 2001
Location: Perry, Iowa
Distribution: Mepis , Debian
Posts: 2,692

Rep: Reputation: 45
Quote:
Originally posted by spaceballs
I guess my real question is why does windows fragment its hard drives, and why does linux not?
bad design, good design
 
Old 03-31-2005, 12:35 AM   #9
carboncopy
Senior Member
 
Registered: Jan 2003
Location: Malaysia
Posts: 1,210
Blog Entries: 4

Rep: Reputation: 45
Well, this is what I read somewhere. Can't remember.

You don't have to worry about fragmentation in NTFS (Windoze). And definately not in ext3, reiserfs, jfs, xfs, etc.

Why? Cause there won't be much performance hit caused by the fragmentation.

Ask me to produce the source? I can't. But, Amit Singh have an article on HFS+ fragmentation.

You can thrown him some question at his forum.
 
Old 03-31-2005, 01:17 AM   #10
chbin
Member
 
Registered: Mar 2005
Distribution: slackware-current
Posts: 379

Rep: Reputation: 31
Quote:
Originally posted by carboncopy
Well, this is what I read somewhere. Can't remember.

You don't have to worry about fragmentation in NTFS (Windoze). And definately not in ext3, reiserfs, jfs, xfs, etc.

Why? Cause there won't be much performance hit caused by the fragmentation.
Are you sure about that NTFS thing. It seemed to get pretty fragemented when I used it. Also windows XP defragements when your computer is idle and moving files that you use a lot to the front of the drive. None the less it still got slower and slower as time went on, but this is typical of any microsoft product so it's hard to say if the filesystem was a contributing factor.
 
Old 03-31-2005, 01:19 AM   #11
carboncopy
Senior Member
 
Registered: Jan 2003
Location: Malaysia
Posts: 1,210
Blog Entries: 4

Rep: Reputation: 45
I am not sure

That is what I read somewhere. So, not verified. However, using diskeeper does help. But, I don't have windoze on my own machine anymore.
 
Old 03-31-2005, 09:36 AM   #12
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207

Rep: Reputation: 47
when Linux boots, the cfdisk script is run and every 30 days it cleans your harddrive-I would think this is a defrag procedure?
 
Old 03-31-2005, 09:48 AM   #13
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
No cfdisk is a partionning tool, maybe you tell about fsck instead ?
In this case, fsck is a tool that check and repair filesystems.

defrag is really done on the fly, when you save a file, copy, delete...
The filesystem try to do its best to put the data blocks in continguous disk spaces
 
Old 03-31-2005, 10:19 AM   #14
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207

Rep: Reputation: 47
You're right-I'm not at a Linux box...I meant fsck.
 
Old 03-31-2005, 11:24 AM   #15
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 -current
Posts: 2,300

Rep: Reputation: 90
The difference is in how the different file systems organize and access the files. Linux filesystems actually organize the files in a logical manner instead of just writing them willy-nilly wherever they will fit in. Windows filesystems are very crappy in that regard and have to be defragmented regularly in order to speed up access times because the files are written all over the place with no sort of logical organization to them.
 
  


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
defrag? dna9 Linux - Software 3 11-18-2004 06:55 PM
defrag dreakon Linux - Newbie 1 11-13-2004 05:29 PM
Is it necessary to defrag? simsjr Linux - Newbie 7 04-27-2004 02:33 AM
How to defrag arsham Linux - General 2 04-01-2004 12:05 AM
Defrag dunmarie Linux - General 4 10-27-2003 02:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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