109 Comments
- evilTak, on 10/12/2007, -4/+73NTFS needs to be defragged regularly. Otherwise, it slows to a crawl after a while.
- bignickolson, on 10/12/2007, -2/+41Wow, have you ever looked at the analyze utility for Disk Defragmenter....
NTFS needs to defrag - inactive, on 10/12/2007, -3/+36NTFS certainly does need to be defragged. I hadn't done it for a few months, and I noticed my PC was acting really slow. I pulled up Task Manager and looked to see if anything was leeching my CPU -- nothing. I pulled up my start list to see if there were any programs there that shouldn't be - none. I ran a spyware scan to see if somehow I picked up some crap - nothing. I opened up Avast to double check I hadn't picked up any viruses -- I was clean.
So after just doing my normal stuff I noticed that my disk light was going on a lot, like it was reading an abnormal amount -- then I thought about defragging -- sure enough, it was 10.8% fragmented. I ran the defrag and my system is back to normal again.
Josh - sundancekid503, on 10/12/2007, -15/+42@atomicham
You're right man. I can't believe how many people defrag NTFS. Same dumbasses who probably change the oil in their cars every 3000 miles. Idiots.... - anglachel, on 10/12/2007, -1/+27Ah ASCII art is there anything you can't explain.
- evilTak, on 10/12/2007, -1/+21I had a long argument with one of my coworkers the other day about whether or not Ext3 needs to be defragged...I ended up pointing him to wikipedia to resolve it.
- inactive, on 10/12/2007, -2/+19Because servers aren't home pcs with viruses and torrents.
- ahhell, on 10/12/2007, -1/+16Who the hell defrags a server?
- ThinkFr33ly, on 10/12/2007, -5/+19First, NTFS fragments far less than FAT did.
Second, the fact that NTFS fragments is not a design flaw or deficiency. It was a design choice, and I would argue, a good one.
By choosing a b-tree structure that fragments you get increased performance *most* of the time. It's only after significant fragmentation that performance starts to suffer by any measurable amount. By significant I mean 30%+ total fragmentation, perhaps 40% file fragmentation. (Free space fragmentation typically hurts writes, while file fragmentation hurts reads.)
This kind of fragmentation usually takes months to build up. The designers of NTFS decided that it was better to do a monthly defrag than sacrifice performance all the time.
People often think their computer feels slow before the defrag and then think it's faster after. This is, in most cases, entirely perception and not reality. Unless your drive is VERY fragmented, defragging does almost nothing to increase performance.
NTFS is widely considered one of the best file systems available. It has excellent performance, and a very rich feature set. The fact that people often harp on its fragmentation characteristics is because there is very little else they can possible say bad about NTFS. - adolfojp, on 10/12/2007, -1/+14This is an article that would have benefited greatly from a slashdot discussion.
All the comments that are in this Digg thread are of the"No it doesn't" "Yes it does n00b" type.
I feel a little bit dumber and I will get modded down even if this comment is technically correct. - inactive, on 10/12/2007, -6/+19It got diggdotted, here is duggmirror for those of you too lazy to go to duggmirror themselves:
http://www.duggmirror.com/linux_unix/Why_Linux_doesn_t_need_regular_defragging/ - brundlefly76, on 10/12/2007, -3/+15This isnt a story about why Linux doesnt need defragging and Windows doe, its a story about why the FAT32 filesystem needs defragging. I dont think I've used FAT32 for about 7 years.
- Luyseyal, on 10/12/2007, -1/+13I have to say this is not strictly true. With high levels of fragmentation on a partition with very little free space, defragging can make a big difference. However, it takes years of specialized behavior to build up to this level (e.g., using Debian unstable for 5 years straight on the same partition with nearly 0 free space...).
Cheers,
-l - cosmotic, on 10/12/2007, -1/+13Performance degrades consistantly, slowly, and constantly, so noticing that you need to defrag is not easy. However, once you do, you will notice the speed increase a lot.
- theendlessnow, on 10/12/2007, -2/+13Article is somewhat accurate, however fragmentation does occur on all Linux filesystem (well... ext2/3, reiserfs and most all poplular ones). Lowest fragmentation goes to reiserfs. You can run it for years and years and never see more than 7% or so fragmentation. I've seen ext2/3 in the teens and low twenties after several years.
Winodws btw, can get up to 30% fragmentation just by doing a few large package installs or patches (scary). And yes... that's NTFS.... - hexix, on 10/12/2007, -4/+15"Someone missed the joke."
I think you forgot to write it. - inactive, on 10/12/2007, -1/+11Exactly!
- elroy, on 10/12/2007, -2/+12reiserfs doesn't frag.
- ucg1, on 10/12/2007, -1/+9@CurtHowland
The "unstable" in Debian refers to the state of the packages (ie they are changing constantly), not to the actual stability of its software packages. In general, the software on it is pretty stable and you can use the distro in your day-to-day use. - inactive, on 10/12/2007, -1/+9If you point to wikipedia and they verify what you say that's still 2 against 1 and therefore by default you win. Not to mention that MOST of the information on wikipedia is accurate. Just because anyone can edit it doesn't mean it stays like that, if you notice a lot of wikipedia entries get locked due to people "vandalizing" them with incorrect information. I'd rather trust information found on wikipedia than most anything else found on the net. Though uncyclopedia.org is the ultimate source for information.
- Carnth, on 10/12/2007, -1/+8It's the opinion I've always held, you can look it up!
-Stephen Colbert - GMorgan, on 10/12/2007, -1/+8Its quite common for ext3 to have < 3% fragmentation after a year of usage. Defragmentation is unnecessary at this point. NTFS generally tends to get > 10% fragmentation after a month, defrag is needed then.
As for multitasking. Windows does this very badly due to expensive process forking. Something that Linux does very very well and is likely its greatest technical strength. - hexix, on 10/12/2007, -0/+7The guy actually states this in his explanation of the linux file systems. If a partition is 80% full, then you start to run out of those padded blank areas to grow your files into. Then you have to start splitting/rearranging your files just like Windows.
- llvllatrix, on 10/12/2007, -0/+7Speed really depends on a number of things. Type of hardware, hdparm settings, which version of windows, gnome, kde? On average my experience has been that linux is much faster at file access, but I tweak with hdparm...
- greyfade, on 10/12/2007, -0/+6@billyboobs34:
it has to do with the way EXT3 and NTFS store file metadata. on NTFS, the metadata is all in one spot: the master dictionary. in EXT3 and other filesystems related to FFS (Fast File System. derivatives include ReiserFS and BeFS, among others), the metadata is stored in a manner similar to files.
in the case of BeFS, for example, there are 3 allocated regions: inode space, index files, and regular files. (the index files are generally fairly large, and are placed at or near the beginning of the drive). inode space and file space is generally split in half, inodes first. new inodes are placed the same way files are, so seeks are involved in reading one after another. each inode stores an indexed list of all subfiles it "contains" - in the case of a directory, these are regular files. then, the operating system reads the list of file inodes form the directory, and loads all of the inodes for all of the files in the list. then, magically, it can build a directory listing.
in NTFS, it has all of the file information in one small spot, so it seeks to the directory, loads its table, and then searches the master directory for the file metadata - all at the beginning of the drive.
both designs have their drawbacks and advantages. in the case of FFS derivatives, the advantage is minimal fragmentation. for NTFS, fast seek times.
but Real Storage Experts know that NTFS sucks for any serious storage problem. - oGMo, on 10/12/2007, -1/+7"(using any number of different filesystems)"
It doesn't. My guess is your definition of "lots of files" isn't the same order of magnitude that "lots of files" in *nix regularly means. Run a usenet feed sometime, where tens of thousands of files in a directory is standard, hundreds of thousands and millions on a filesystem, where you are more concerned about inode usage than block usage.
Some FS's (i.e., not ext2/3) handle this well. I believe reiser and xfs are good at this, for instance. - bigtomrodney, on 10/12/2007, -2/+8Well maybe it's not an issue, but defragging once a month is still 12 times a year more than a linux user.
- llvllatrix, on 10/12/2007, -0/+6hdparm as previously mentioned (use with caution):
http://www.linuxdevcenter.com/pub/a/linux/2000/06/29/hdparm.html - GMorgan, on 10/12/2007, -0/+6Actually jornalling is used for HDD recovery rather than defragging.
- Magadass, on 10/12/2007, -0/+5"How linux gave me a handjob!"
- dattaway, on 10/12/2007, -0/+5Sorting directories is set at default with most Linux utilities. On the filesystem itself, they are not sorted in any particular order. That's where your time goes. You can turn this off. Yes, I know.....
- mmaterie, on 10/12/2007, -3/+8It looks like someone recently played around with DiskEdit and viewed some index records...
There's a number of flaws with this article. I realize the idea was to "paint a picture", but that picture simply does not translate to reality.
Here's what needs to be correct with this article, without getting overly technical:
1. Fragmentation is a I/O issues with "clusters" not with bytes. Clusters are the result of formatting of sectors (which each hold 512 bytes of data) in groups. In NTFS a cluster can be comprised of anywhere from 1 to 128 sectors. Again, I understand the paint-the-picture concept but it doesn't work here.
2. FAT is not NTFS or ext2/3 or Reiser, or anything else. The argument should be why one file system is more efficient than another, not OS. Reiser is widely regarded (due to a feature called tail-packing) to be less sensitive to the effects of fragmentation, though at a cost of some overhead. A few of the comments made are relatively accurate for FAT, but cannot therefore be said to mean "Windows". FAT is terribly inefficient the larger the disk, as it is a flat index. NTFS is hierarchical and uses what is called a B+ tree.
3. NTFS 3.x does not behave the same as NTFS in NT4. It uses a best-fit algorithm and keeps in cache a list of some 9000+ free space segments. It also creates an "over allocation" as it writes files. That over allocation is essentially a "pad" at the end of the file should it need to expand further during the write process. It does not write files to the front of the disk. http://files.diskeeper.com/pdf/HowFileFragmentationOccursonWindowsXP.pdf
4. OS'es have inherent limits in the size of I/O processed. That too makes a difference in how much of an impact fragmentation can have. This is why NTFS uses the over-allocation buffer.
5. Fragmentation is a "logical" issue at the file system that typically results in physical displacement on the disk. The drive geometry is irrelevant with possible exception that fragments on a common "track" can theoretically be accessed faster than a physically contiguous file on multiple tracks.
6. Windows is absolutely a multiple-user OS. "Users" is a misnomer. The word that is appropriate is multiple processes (hence pre-emptive multitasking). And yes, every OS does that a little differently.
7. No defrag software came with your Linux OS likely because 1. there are some free ones already available (most are not very good), 2. the major Linux distributors haven't put one in yet (remember NT4) 3. third party vendors haven't developed one yet (there are business reasons involved http://www.diskeeperblog.com/ -see the topic on Linux). As noted, third party tools for Windows improve upon the default product in many ways. - inactive, on 10/12/2007, -15/+20Heathen!
The site was dugg, not diggdotted. Don't make me sic Kevin Rose on you. - nogami, on 10/12/2007, -2/+6Realistically, ANY filesystem "could" need to be defragged, it all depends on what you do with it and how much space you leave free on the drive. Unix/Linux based operating systems decrease the likelyhood of file fragmentation, but there are cases where it still can crop-up.
- phuchead, on 10/12/2007, -4/+8Because NTFS is STILL a single user file system, although they added better multi-user support, you cannot easily have three or four users running at the same time on the same box in windows, even XP and Win2kPro, i don't think that Win2kPro even had support for this, correct me if i am wrong, i am sure that you will! BUT NTFS is still going to be flawed and majorly because it is still looked at as a single user file system. One, if the guys i work with had a drive that was 99% fragmented, i could not believe it!!! AND he knows computer software repair, he claimed that he just did not have time, i kind of understand that is why i am getting to the point that, unless you want a very low waste machine to try disk keeper, it runs all the time and constantly defrags, but i have heard from some other people, that if you have over 50% usage it is the same as not doing anything. i use it and am anal about running defrag and have not noticed it being an issue, but i run the program about every week. WARNING:: it does replace the windows defrager, such that you cannot run defrag from safe mode, the only problem i have with the proggy.
-phuc - totorototoro, on 10/12/2007, -0/+4trunkster:
file fragmentation: files get broken into little pieces spread across the hard drive
apparently, OS X, for example, does this to combat file fragmentation:
Everytime an application opens a file for reading, HFS+ checks if the
file is fragmented and is less than 20MB in size. If so, it copies the
file's contents to a continuous region on the disk and frees up the
previously allocated blocks.
disk fragmentation: spaces left between files saved as above.
http://www.macattorney.com/ts.html#Anchor-31774 - trunkster, on 10/12/2007, -2/+6It's a performance issue not an error or system problem.
- jeffmahoney, on 10/12/2007, -0/+4@elroy: *Any* file system suffers from fragmentation, including ReiserFS. There is no perfect allocation algorithm, and certainly not one that will run in acceptable, constant time. The allocator does some guess-work, and hopes for the best, which is hard given that there are so many different workloads and they would all benefit from different algorithms differently. Fragmentation is becoming more and more important due to the size of disks growing much too large for a simple backup/restore defragment operation to work (that's the typical way to defragment UNIX-ish file systems, when no defragmenter exists). Fragmentation will continue to exist until seek-less media is ubiquitous, it will need to be corrected, and it will need to be done online.
- steger, on 10/12/2007, -1/+5You do know that the HD is the bottleneck on any system? So thus having less time to load programs up, get files or start up windows can "speed up" a system. Plus 3rd party' defragmenters also can defrag the paging file and the MTF which really do fragment and cannot be accessed by the built-in.
There have been reports that when servers get defragged frequently that there are fewer help desk tickets within companies pertaining to slow systems or slow server access. - bigtomrodney, on 10/12/2007, -0/+4Nah it's great for tech stuff, because all of the trolls and fanbois came here. And if we can be honest for a minute they're the entertaining ones.
- GMorgan, on 10/12/2007, -0/+3Vista is using NTFS, they were originally going to tack a relational database on top of it but they've even dropped these plans. Endless defragging it is then.
- GMorgan, on 10/12/2007, -0/+3Linux can now do everything. Soon it will replace your girlfriend as well.
- mapkinase, on 10/12/2007, -5/+8Usually it comes to a problem only when your disk is almost full.
- motang, on 10/12/2007, -0/+3yeah a filesystem course at your local college will take care of that.
;-) - hexix, on 10/12/2007, -0/+3Yes, if you resize a partition the data often needs to get reshuffled. That is why a few years ago you'd have to buy Partition Magic if you wanted to partition your drive without losing what was currently on it. Now you can get the GParted live cd and that seems to support resizing for most file system types, which is awesome since it's free.
Oh, and I just used it a couple days ago to resize a ext3 filesystem and it worked fine. - saifatlast, on 10/12/2007, -0/+3NTFS is journaled too.
- steger, on 10/12/2007, -0/+3NTFS drives do need to be set to defrag regularly, especially with servers. The more files you have being copied, moved, changed etc on a drive, the more it is going to get fragmented. The drive isn't going to put it back in the same place where it was.
When a file, lets say a decent size powerpoint presentation, is spread apart on a drive, it is going to take much longer to grab that file than say if it was defragged and placed together. This means less wear and tear on a drive as it now doesn't have to go all over the place to look for the pieces of a file.
Same thing happens on workstations, even if you are just browsing the Internet, creating and editing word documents or listening to music. Systems and Servers run faster when they are thoroughly defragged.
There are some 3rd party defrag software that does a lot better than the built in like raxco and diskeeper(both for windows), even though the built in (for windows) was made by diskeeper. - hexix, on 10/12/2007, -0/+3You can easily check the revision history of a wiki article and see if the section making/disproving a point has been recently edited. Wiki is a damn nice source for computer related stuff.
- damentz, on 10/12/2007, -1/+4lolololol
- grumpyrain, on 10/12/2007, -0/+2Looking forward, fragmentation is going to become even less of an issue. Not saying that the file systems that currently fragment files won't, but that the performance penalties will dissappear.
So what is the problem with fragmentation? Put simply, it is hard drive technology. Data are stored on the magnetised surface of the platters, which are spinning under a read/write head.
With such a storage system, it is ideal that data is stored in close physical proximity. Even though disks spin between 5200 and 15000RPM, fragmentation can cause significant delays in receiving the data. Also, reading and writing data to the outer tracks is much faster (ie double speed) to the inner tracks, because, well just look at a circle.
The designers of many popular file systems took these physical characteristics of hard drive storage technology into account when designing their file systems. There is no good reason to prefer data to be written to the first blocks of the disk, or to prefer that files are not fragmented other than on disk based technology this gives better performance.
So what is likely to happen? Solid state memory is now offering capacities large and cheap enough to be considered for basic installations. We are not talking about massive DivX collection sized storage capacities, but we are currently getting several Gigabytes solid state for the price of a hard drive. There are still concerns regarding write cycles that will need to be addressed. File systems that tend to favour particular regions of a disk will limit the lifespan of solid state memory, where file systems that literally choose random empty blocks will maximise the lifespan.
If you think about the files that fragment, they don't tend to be large (with the exception of databases, but they are designed to not worry about fragmentation). Large files tend to be multimedia, it is not a mp3 collection is going to suffer file fragmentation. Other files are more likely to fragment, so in the medium term solutions will tend to have the more static files stored on hard drive technology, and the files that change on solid state. Solid state walks all over hard drives in terms of access time.
And yes, this will happen soon. I have been using a flash based PC in our lab for some tests this week. -
Show 51 - 100 of 105 discussions



What is Digg?
Check out the new & improved