Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

What defrag utilites can i use in Linux?

  • 20-01-2009 6:00pm
    #1
    Registered Users, Registered Users 2 Posts: 94 ✭✭


    I am using Ubuntu. I have looked everywhere for one and can't seem to find one. All I keep getting is "you don't need to defrag Linux". I understand that it uses a different file system but that doesn't completely stop fragmenting of files. I heard that Linux uses a different name for defragging. Maybe that has been my problem in finding a utility?

    Also theres similar response when searching regarding virus protection. I would still prefer to have protection even if Linux is not as prone to virus'

    Any help would be appreciated.


Comments

  • Closed Accounts Posts: 12,807 ✭✭✭✭Orion


    You don't need to defrag in Linux :p

    Seriously tho - you don't. You're thinking in a Windows mindset where NTFS/FAT allocate files in a linear fashion on the disk which results in file defragmentation. Unix filesystems allocate files based on the geometry of the disk which means that fragmentation is actually expected if you look at it from a linear point of view.

    Here's a full explanation.

    Here's a slightly more tongue-in-cheek explanation.


  • Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭Khannie


    Depends on the filesystem ofc. XFS can (and should) be defrag'd.


  • Closed Accounts Posts: 1,377 ✭✭✭An Fear Aniar


    There is inevitably some fragmentation in Linux - but nobody seems to need to defrag.

    The best way to limit fragging is to have a separate /tmp partition, as this is where most of the writing to disk will be, afaik. Really though, most Linux users don't find fragging a problem at all.


    .


  • Closed Accounts Posts: 12,807 ✭✭✭✭Orion


    Khannie has a point. xfs is designed for large files - it's harder to fill gaps with files the size that xfs is aimed at. But that said - fragmentation isn't really a problem either with such files.

    ext3 doesn't need a defrag because of its design. Yes there may be some minor fragmentation as a disk fulls up but not to the level of performance degradation of teh likes of ntfs/fat. You can defrag it but it requires converting to ext2 and using e2defrag - but why you would want to do that is beyond me. And doing so can cause data loss as ext2 doesn't know how to handle the journalling remnants from ext3.


  • Closed Accounts Posts: 2,917 ✭✭✭towel401


    xfs_fsr

    but you probably don't use xfs :( xfs is daycent

    there's something similar for ext2 also. but not ext3


  • Advertisement
  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 93,567 Mod ✭✭✭✭Capt'n Midnight


    saw a nice link on this a while back cba looking for it

    windows defrag jams the files up against each other so when you edit a file or apply a patch it gets added at the end of the drive (or something) because there are no gaps at the start of the drive, so recent files are slowest and since optimisation is for free space, files may not be contiguous and rapidly get worse. large files of several GB can be in over a hundred thousand fragments :eek:

    unix/linux leaves gaps between files so if you edit a file it can grow into the gap so more likely to be contiguous and chances are there is a gap the size of the file nearer the start of the drive

    if you have 15% of the drive free then defrag won't improve performance


Advertisement