# What about defragmentation?

## sciack

Hi dudes,

I was wondering about defragmentation under Linux. Probably it's a stupid thing... But how does it work with ext3 and xfs? Answer me if it simple or redirect me to the documentaion.

Thanks.

 :Wink: 

----------

## Miles

Linux file systems don't need to be defragmented because they're 'smarter' at laying out files than file systems used by other operating systems.

----------

## sciack

 *Miles wrote:*   

> Linux file systems don't need to be defragmented because they're 'smarter' at laying out files than file systems used by other operating systems.

 

javascript:emoticon(' :Shocked: ')

that's amazing!  :Wink: ) I didnt know  :Wink: )

thanks

bye

----------

## Sivar

The FSs are smarter, but a small amount of fragmentation *does* occur. Fortunately, the filesystem drivers intelligently defragment fragmentation "on the fly" so your fragmentation rarely exceeds 0.7%

----------

## lain iwakura

ya, ya gotta love linux for that!    :Exclamation:   :Very Happy: 

btw, nice monkey avatar.   :Razz: 

----------

## mrhodes

Hello, 

I have been using linux for a short while now, and I have been wondering if there is such a thing as a defrag program for linux?  I can't see why there wouldn't be something of this nature for linux...

Well, if there isn't such a program, could someone please explain how linux maintains the fragmentation that occurs on the harddrive...

Thank you,

Mike Rhodes

----------

## AutoBot

There is an old ext2/minix defrag  utility, and I'm guessing it would work on ext3 also.

----------

## abhishek

 *AutoBot wrote:*   

> There is an old ext2/minix defrag  utility, and I'm guessing it would work on ext3 also.

 

Would' that be a waste of time because most linuf filesystems get a low amount of fragmentation?

----------

## delta407

The filesystems are fine without manual defragmentation, and there's usually a negligible performance increase from running it, so it's probably just a waste of time.

----------

## AutoBot

I have never tried the application, but delta407 is correct IMO.

----------

