Find the answer to your Linux question:
Results 1 to 7 of 7
Hi All, I've read lots of articles on why defrag isn't necessary and it basically comes down to how the files are read on the disc and the fact that ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru jmadero's Avatar
    Join Date
    Jul 2007
    Location
    California
    Posts
    2,003

    Another "Why no Defrag" question


    Hi All,

    I've read lots of articles on why defrag isn't necessary and it basically comes down to how the files are read on the disc and the fact that Unix starts from the middle of the disc instead of the beginning like Windows does.

    So, I am dual booting and for the first time in few months I was forced to go into Windows (I couldn't open a .doc in open office....first time ever). For the fun of it I did a defrag analysis and it said I had 22% fragmented which I can understand how that wouldn't effect Linux BUT it said my "largest free space extent" was only 614 megs....in a 350 gig hard drive.

    I use the Windows boot as my main partition only because Windows has a difficult time seeing EXT4 and EXT3 from Linux....

    Can someone explain how having my largest free space extent at 600ish megs is not going to affect performance in Linux?

    Thanks all
    Bodhi 1.3 & Bodhi 1.4 using E17
    Dell Studio 17, Intel Graphics card, 4 gigs of RAM, E17

    "The beauty in life can only be found by moving past the materialism which defines human nature and into the higher realm of thought and knowledge"

  2. #2
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,763
    What?

    *If* you are referring to NTFS: NTFS is a Windows-specific filesystem. NTFS drivers are meant for NTFS *compatibility* with Linux. Full NTFS tools are available in Windows - use them if you have an NTFS issue.

    Installing Linux to an NTFS filesystem is like putting a Chevy engine into an RX8 and then complaining that Mazda doesn't do a better effort helping you do it. What reasoning would support that?

    NTFS will fragment - it is a filesystem design issue. If you use the partition *that* much, you should use the native NTFS tools to clean it.

  3. #3
    Linux Guru jmadero's Avatar
    Join Date
    Jul 2007
    Location
    California
    Posts
    2,003
    I wasn't complaining, just asking for a technical reason why, I understand that NTFS has a whole list of issues....that wasn't my question. I guess I can clarify if I wasn't clear to begin with:

    1. How does EXT4 avoid having such small "contingent openings" while NTFS clearly does not? Is it always rearranging files for you in order to keep open large chunks of available use sectors?

    2. If you are using NTFS for a partition (obviously I am and I have a good reason to do so), does having really small available "pockets" of space on the hard drive effect performance within LinuX?

    Again, no complaints, I use Windows because of two things....openoffice issues once in a great while (mentioned in my post), and for netflix instant view (I pay for it and unfortunately they use crappy DRM stuff...I'm not willing to pirate so it's my best option as of now)
    Bodhi 1.3 & Bodhi 1.4 using E17
    Dell Studio 17, Intel Graphics card, 4 gigs of RAM, E17

    "The beauty in life can only be found by moving past the materialism which defines human nature and into the higher realm of thought and knowledge"

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,763
    Quote Originally Posted by jmadero View Post
    1. How does EXT4 avoid having such small "contingent openings" while NTFS clearly does not? Is it always rearranging files for you in order to keep open large chunks of available use sectors?

    2. If you are using NTFS for a partition (obviously I am and I have a good reason to do so), does having really small available "pockets" of space on the hard drive effect performance within LinuX?
    1) All filesystems have fragmentation - some just take a lot longer than others. How does EXT4 avoid this? Read the ext4 tech docs. Every filesystem may take a different approach. Besides ext2/3/4, there is reiserfs, XFS, JFS, BTRFS, etc. The Wikipedia article on fragmentation is also available.

    2) NTFS fragmentation does not affect "performance" in Linux. It affects *filesystem* performance. From the Wikipedia link:

    File system fragmentation increases disk head movement or seeks, which are known to hinder throughput.
    There it is in a nutshell.

    ** And, FYI, ext4 does have a defrag utility.

  6. #5
    Linux Guru jmadero's Avatar
    Join Date
    Jul 2007
    Location
    California
    Posts
    2,003
    Very interesting article I'm going to give it a shot, although, I've never noticed slow downs in Linux even with Ext3 so I can't imagine it's "fragmented" like I'm seeing in NTFS....
    Bodhi 1.3 & Bodhi 1.4 using E17
    Dell Studio 17, Intel Graphics card, 4 gigs of RAM, E17

    "The beauty in life can only be found by moving past the materialism which defines human nature and into the higher realm of thought and knowledge"

  7. #6
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    You should read on I/O schedulers.

    The issue in Windows is not only fragmentation, it's that the OS is dumb like a cow. In Linux, the OS reorders the I/O operations so they are done in a sane way, so the disk seeks are reduced to a minimum even in a fragmented volume, unless the fragmentation is really really high. Most linux fs implementations also reduce the fragmentation in one way or another, but the big difference is how the I/O is ordered.

  8. #7
    Just Joined!
    Join Date
    Oct 2009
    Posts
    1
    Cheers!
    Valikie
    Out of the many posts, this one attract my attention. I believe it is possible for anyone to participate.
    Excellent ! I like it very much.

Posting Permissions

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