Find the answer to your Linux question:
Results 1 to 10 of 10
Ok, I visit a lot of different forums on computers and such, and I always hear about how with a Windows system, you have to defrag your harddrive a lot. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    May 2003
    Posts
    123

    A question about Linux


    Ok, I visit a lot of different forums on computers and such, and I always hear about how with a Windows system, you have to defrag your harddrive a lot. I'm wondering, does Linux suffer from the same problems as the Windows drives, and do you have to defragment it at all?

    Thanks in advance.

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Well, let's just say that there isn't even a defragmentation program for Linux's filesystems.

  3. #3
    Linux Engineer
    Join Date
    Nov 2002
    Location
    Queens, NY
    Posts
    1,319
    Dolda,

    Do you know exactly how defragmentation works in Linux? I know that it's automatic but I wonder if that's really a good thing. For example, what happens when I'm heavily using the hard drive and defrag starts to occur?
    The best things in life are free.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    I don't really think that there is any defragmentation at all. I haven't really examined this, but I know that no defragmentation process ever occurs. I'm guessing that the kernel simply chooses new blocks for files in such a way that the block device request reordering algorithms can make access fast and painless without having the disk defragmented.

  6. #5
    Linux Engineer
    Join Date
    Nov 2002
    Location
    Queens, NY
    Posts
    1,319
    I remember reading a Redhat book (I think it was the dummies book) that stated that Linux has auto defrag. They never got into detail on how this process works but I always thought that a defrag program actually ran. I can remember times where the disk was being used even when I wasn't doing anything. The way the disk was being scanned, it reminded me of Windows' defrag. Of course nothing here is proven so that previous sentence isn't much proof but with Debian, I've never had that kind of scans on my hard drive. So does this mean Redhat has an actual defrag program? Probably not. It could have been just my dumb ass imagination.
    The best things in life are free.

  7. #6
    Just Joined!
    Join Date
    Jun 2003
    Location
    Helsinki, Finland
    Posts
    78
    This URL states

    Users of the ext2 file system can probably do without defrag, because ext2 contains extra code to keep fragmentation reduced even in very full file systems.
    Not sure about Reiser or the other linux fs.

  8. #7
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    caffeine - They probably work in similar ways. All these are designed to be high-performance file systems, after all.

    bpark - I'm guessing that was the updatedb program for slocate.

  9. #8
    Linux User sheds's Avatar
    Join Date
    Nov 2004
    Location
    ??????????
    Posts
    342
    I've checked out several sites, this one i found it to be good to get acquainted with the issue:

    http://cbbrowne.com/info/defrag.html

    It states that um, linux does not require any defrag, cause the filesystem is really organized. I don't remember, read it.

  10. #9
    Linux Guru loft306's Avatar
    Join Date
    Oct 2003
    Location
    The DairyLand
    Posts
    1,666
    defragging on linux dose not exist...there is no need ! and there is no need because in linux there is this well trained little penguine called Tux and when he is done with something he puts it back where he found it ! not like in windows where windows leaves little pices or apps and garbage all over the hdd for defrag to put away later.!
    ~Mike ~~~ Forum Rules
    Testing? What's that? If it compiles, it is good, if it boots up, it is perfect. ~ Linus Torvalds
    http://loft306.org

  11. #10
    Linux Engineer
    Join Date
    Nov 2004
    Location
    home
    Posts
    796
    Linux doesn't need defragging. Linux filesystems are superior, they put everything in the right place the first time.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •