Does defragmenting your hard drives, including the ones you use for recording audio, really result in better PC performance? Opinion is divided, so we take a considered look at the subject, as well as testing some of the most suitable 'defragger' utilities.
Defragmentation is essentially the art of rearranging files on your hard drives to enhance performance, and there are regular queries on the SOS Forums from people asking what is the best 'defragger' utility. Noticing these queries, I thought that I'd investigate a few such utilities and report back with my findings, as part of a more general roundup of software that proves particularly handy for the PC musician. However, during the course of my research I discovered so many conflicting opinions on the actual merits of hard drive defragmentation — ranging from those who recommend 'defragging' after every recording session to those who never do it at all, claiming either that it's unnecessary or that it can even degrade performance — that I decided to explore the whole subject in more detail, with the needs of the musician in mind.
Because Windows saves data wherever it can on your hard drives, often in unused gaps between other saved files, some files may end up in several scattered fragments. Reading such a file takes longer than reading one stored in a single piece, as the read/write heads have the additional travel time of jumping from the end of one fragment to the beginning of the next before continuing to read its data. As you carry on deleting and saving files, and particularly as your drive fills up beyond 70 percent or so of its total capacity, fragmentation may get worse.
Defragmenting the contents of your hard drive involves locating all the parts of each fragmented file and bringing them back together, by saving the now contiguous data to another more suitable location on the drive. This means that Windows only has to look in one place for each file, which can help its performance, by avoiding unnecessary read/write head activity, and can result in both Windows and its applications loading more quickly. General file access can also be smoother.
If you adopt the outer 'Current Project' partition and inner 'Project Backups' partition arrangement that I suggested in last month's PC Musician, before you start on any new project you'll be able to delete the entire contents of the outer partition, so that it starts with a clean slate and no fragmentation, for maximum performance. However, if you're maintaining large unpartitioned hard drives holding vast amounts of data, fragmentation can become an increasingly important issue. While your Windows partition may benefit from regular attention, drives containing audio and particularly video files may benefit even more, because they are not only much larger but also more likely to be regularly edited during a project, resulting in further fragmentation.
Many large, modern drives contain multiple platters and four or more read/write heads, so we can't always visualise our files as being best laid-out neatly in one area of one platter — indeed, it may sometimes be preferable to have a single file spread over several platters, so that it's easily accessible to several read heads almost simultaneously. A drive may also feature cache memory of 8MB or more, which can also affect the issue of optimum file placement, because some of the required data may already be present in the cache (although reading and writing audio files nearly always results in large files that will soon swamp any cache).
Some commentators claim that multiple platters and large caches mean that defragger utilities that gather together all the fragments of long files into one neat area will automatically result in worse performance. They also imply that the utility developers are conning the public, because this approach undermines attempts by both drive and operating system to place the data according to their own internal algorithms. However, this view doesn't take into account the fact that defragger utilities are also written by file system experts, and their own algorithms are obviously honed and polished by practical tests with real-world systems.
It doesn't matter how much theoretical discussion there is: if you defrag your drive and can measure an improvement in performance, such as an increased number of audio tracks before your audio application conks out, that utility works for you! Unfortunately, in my discussions with defrag utility developers it became clear that their algorithms don't take into account the unique access pattern of multitrack audio applications with large simultaneous numbers of huge audio files — so, as they say, your mileage may vary!
Apple state that their users probably won't need to defragment at all if they run the Mac OS X operating system, because the Extended formatting (HFS Plus) of Mac OS X avoids re-using space from deleted files as much as possible, to avoid prematurely filling small, recently freed areas. Windows doesn't yet seem to be quite as clever, so defragging is still useful for the PC Musician. It also seems generally accepted that keeping plenty of free space on Windows drives or partitions (30 percent or more) will help Windows save new files more sensibly, rather than letting it work around gaps between existing files. The general advice given by most PC experts is that anyone who still creates their hard drives in FAT32 format should periodically analyse them to check fragmentation levels. Those who have adopted the more recent (and more secure) NTFS format are less likely to experience fragmentation, but they should also still occasionally check on fragmentation levels.
If you click on the Analyse button of Window's own bundled Disk Defragmenter tool, it will suggest you defragment a partition or complete drive once the fragmentation level reaches a certain threshold (implying a noticeable downgrading of performance) — although you can, of course, ignore its advice and defragment as often as you like, for smaller performance benefits. It certainly makes sense to do so after installing Windows, after installing lots of new software (and, in particular, games, which can sometimes include a huge number of files), or after a good clear-out when you may have deleted lots of files.
You can set up many defraggers to defrag at a specific time and date, but I always avoid such an approach, since my PC isn't switched on 24 hours a day and I don't want defragmentation to start if I happen to be busy doing something important at the time. Others may offer to run quietly in the background, but however clever they claim to be in detecting when the user is asking the PC to perform other tasks, I still err on the side of caution when running audio applications and disable such cleverness, just in case it results in a single click during an otherwise perfect take. I personally tend to instigate a routine manual defrag of my Windows drive once every month or so, if necessary.
Whatever your personal decision for your Windows and application partition or drive, when it comes to those used to store audio and video files even Apple are in agreement that people who create or modify large audio or video files might benefit from defragmentation (even when running Mac OS X). However, there's also a school of thought that says you're better off not tidying up huge audio files into single neat units, as I first explained way back in SOS April 2002. When reading long multiple audio tracks, your sequencer application will access a chunk of each one in turn, before returning for another chunk of each one. So storing them in interleaved chunks of the size your audio application uses may result in less drive activity than having any existing fragments painstakingly reassembled into neat monolithic files, one after the other.
At the time of writing the article mentioned above, I suggested that only the sequencer developers themselves could provide us with a suitable utility to rearrange audio files to suit their particular file requirements. However, in the absence of such utilities, I suggest that if you (for example) record 16 simultaneous live audio tracks into an empty partition and then play them back and do a little editing and mixing, you shouldn't defragment at all — your data will already have been laid down in possibly the best arrangement on the drive.
However, if you do lots of subsequent editing, or store various songs or projects on the same partition or drive, it makes sense to defragment, particularly if you notice any tell-tale signs of excessive drive activity. One classic sign is increased audio drive noise: a series of steady clicks indicates progressive head movements as each chunk is accessed, whereas erratic or frantic whirring suggests that the read/write heads are being thrashed to and fro and the drive may thus benefit from a defrag. Another tell-tale sign of erratic drive activity is occasional spikes on your audio application's disk meter. If these coincide with the start of a new verse or section it may simply be because your song has just started accessing lots of new audio parts simultaneously. However, if these spikes are more random, they may suggest the presence of lots of fragmented files. A defragger analysis will soon tell you. In the case of frantic drive activity you'll probably notice a drop in head noise after defragging — which would confirm the diagnosis.
Defragmented partitions will probably also take less time to back up, and will probably generate audio export files or render video or animation files more quickly. Moreover, consolidating the free space on your drive into one huge chunk can also make audio clicks and pops or dropped video frames during future recordings less likely, because future recordings won't immediately end up wedged into the remaining nooks and crannies. Such consolidation can sometimes prove as beneficial as defragmenting the files themselves.
Having discussed the pros and cons of defragging your hard drives, we'll turn to what's on offer for doing the job. First, Windows XP and 2000 both include a Disk Defragmenter utility (a cut-down version of Executive Software's Diskeeper product), which can monitor your file activity to work out which files you access most often and then rearrange them on your hard drives to eliminate excessive head seek activity. This 'pre-fetch optimisation' only works if you have Task Scheduler enabled, but if you want to avoid the possibility of file rearrangement happening at an inopportune moment you can manually run the Defragmenter utility whenever you prefer.
The Windows Defragmenter is a freebie, which is always nice, but many musicians do become dissatisfied with it, as it has various limitations compared with the full version available direct from Executive Software (more on this in a moment). These limitations include the inability to defragment the MFT (Master File Table) on NTFS-formatted drives, directories on FAT32 formats, the paging file, and certain other system files. The freeware Page Defrag utility from www.sysinternals.com that I first mentioned in PC Notes October 2003 will take care of the paging file, but Microsoft's bundled defragger has still more limitations: it can't defragment more than one volume at a time, or be scheduled to run at a specific time, and these latter options prevent you from easily 'defragging' all your drives overnight, for instance, if you would like to. The utility can also take a long time to defragment a volume, even if it contains minimal fragmentation, and for musicians with huge audio and sample drives this can make 'defragging' an excruciating experience. Moreover, it doesn't consolidate the free space into one neat chunk, so even after defragging your neatly reorganised files may still end up spread across several areas of the drive with space between them — making it likely that the next large file you save will immediately become fragmented!
The Windows Defragmenter also requires a minimum of 15 percent free space on a drive to adequately do its job (not very helpful if you have a well-stuffed drive that could benefit from a tidy-up). However, the most annoying limitation is that it simply refuses to defragment some files, for reasons known only to itself. For instance, on my PC it avoids the 450MB of files that comprise Groove Agent 's drum kit. Microsoft are quite open about these limitations (you can read the full list of explanations in their Knowledge Base), but they leave many musicians wanting to search out a better option.
- Ensuring that you have plenty of free space on your drive should always help to keep fragmentation levels low, but also offers another benefit: your files should end up being mostly placed in the 'outer' and therefore faster part of the drive for better performance. Some musicians even buy a drive of the 'next size up' to their immediate requirements, to ensure that this happens. It generally doesn't cost much more.
- Creating separate smaller partitions for Windows, data, audio files, sample files and so on allows you not only to back up each one more quickly and easily, but also to defragment them considerably more quickly.
- If you maintain a separate 'Current Project' partition for your audio files, you can back it up either by creating an image file to another partition or drive, using a utility such as Norton's Ghost, or simply by dragging all the files across using Windows Explorer. If you feel that the file layout created by your audio application may already be perfect, or may have resulted in a set of interleaved files that possibly provide better performance, an image file will preserve this exact layout for posterity. However, for audio backups you may prefer to use Explorer, since its method of copying all the files across in turn will result in zero fragmentation on the backup, and zero fragmentation if you later move them back for further editing. Using this approach, you may never need to defragment your audio partition.
A widely purchased alternative is Executive Software's Diskeeper 9 Professional (www.execsoft.co.uk) at £45 including VAT, or $49 from the US web site. I've seen claims from some users that this runs up to 10 times as fast as the cut-down version bundled with Windows. Unlike that version, it also offers complete rather than partial defragmentation (although it still does its work best if you have at least 20 percent of free space left on your partition). In addition, it consolidates free space, deals with critical system files when running its Boot-Time Mode, and can defragment multiple partitions simultaneously. None of these operations are offered by the cheaper Diskeeper Home version, which, although being offered for only £23 on UK and $30 on US web sites, should probably therefore be avoided.
Both Home and Pro versions of Diskeeper offer a 'set and forget' feature that defrags in the background. Most musicians should really disable this, to avoid it cutting in at the wrong moment. (Incidentally, some users have found that despite disabling 'set and forget' mode it is automatically activated after a manual defrag and remains so until the next reboot — so don't defrag your audio drive with it and immediately try recording a huge live performance!)
I was impressed by Diskeeper 9 Pro 's straightforward yet thorough approach to both online and offline (ie. performed on the next boot before Windows is loaded) defragging. However, its multi-pass engine may end up taking longer to complete the task on congested drives than some rivals, since it may require several passes to achieve optimum file placement. Moreover, while it does consolidate free space, it does this as a separate, ongoing process as part of 'set and forget' mode, rather than as part of the defragging operation.
Diskeeper 9 Pro has many contented users, but during my research two other products stood out as having particular strengths for the PC musician. The first is Raxco Software's Perfect Disk Workstation (www.raxco.com/products/perfectdisk2k) which, for about £40, has won a lot of admirers for the thoroughness of its speedy single-pass defragmentation, which nearly always means that all your files will be placed in their new optimum positions in one run. It also works well down to five percent of remaining free space if your drives are well stuffed. Perfect Disk Workstation may also be more suitable for anyone running Windows Server 2003 or a PC network (which normally require a more expensive Server version of most other defragmenters), and will cope with several huge drives of several terabytes in size. It also supports all levels of RAID, for those with more ambitious setups.
If you want the fastest results, the software's Smart Placement algorithms work well, although they may leave some tiny blocks of free space between files. While it takes a little longer, the 'Aggressively free space consolidation' option makes more sense for audio and sample drives. For the most thorough results, the offline defragmentation option can run on the next boot and (depending on the particular operating system and drive format) can deal with the Master File Table, page file, Hibernate file and directories. I found this option quick, easy and thorough.
However, although the user can specifically exclude certain files or folders during an online defrag, Perfect Disk deliberately doesn't support user-customised placement of files, claiming that "this provides little improvement in file system performance". I ended up having some long email correspondence with one of Raxco's System Engineers about this fact, and he maintained that file/free-space defragmentation has a far greater and measurable positive impact on file system/drive peformance than trying to place files at specific logical clusters in the hope that that they're on the 'fastest' part of the drive. Nevertheless, he did admit that he knew little about audio/video streaming, editing and processing, or the algorithms used by audio and video applications to maximise disk performance.
Overall, I was impressed by the speed and thoroughness of Raxco's Perfect Disk and, like various other people who had downloaded the demo version, I was first offered a 20 percent and then a 25 percent discount by email, bringing the final cost down to a very reasonable £30.
The other defragmenter that may particularly appeal to musicians, and that regularly seems to top the polls in mainstream PC magazines, is O&O's Defrag 6.5. This is largely because although it can sometimes take longer to perform its magic, it tends to result in lower fragmentation overall, even when its competitors claim not to be able to reduce fragmentation on a particular drive any further. The professional edition for use on a single PC running Windows NT, 2000 or XP also costs around £27, which is probably low enough to make it an essential purchase for many musicians. However, you'll need the more expensive Server version if you've got a network or run Windows Server 2003.
Like Perfect Disk, Defrag 6.5 supports any number of IDE or SCSI hard drives, up to terabytes in size, as well as RAID, and defrags the MFT, Registry and paging file. It offers plenty of background defrag options, such as automatic defragging once a particular drive reaches a pre-determined threshold defragmentation level, and neat twists such as automatically dropping into pause mode if you unplug your laptop from the mains (to preserve its batteries), then automatically continuing where it left off as soon as you plug it in again. Sadly, for the musician automatic functions such as these are mostly to be avoided.
It was the software's five optimisation strategies that particularly caught my attention. Stealth mode is the fastest method, most suitable for initial defragmentation and for large file servers. It also performs some free space consolidation, although full details of its strategy aren't explained. Space mode requires far less free space on the drive than the other approaches and it maximises the contiguous free space more thoroughly, whereas the Complete/Access, Complete/Modified, and Complete/Name methods additionally reorganise your entire file placement on the drive, according to when files were most recently accessed or most recently modified, or alphabetically.
I immediately started making plans to measure performance improvements after optimising my Gigastudio streamed sample partition using the Complete/Access mode, so that the instruments I used most often would end up at the beginning of the drive for quickest future access and best polyphony (remember that on most drives read performance drops from the outside to the inside by about 50 percent). It's impossible to guess the practical results of such a reorganisation, because while your most-used instruments will benefit from a faster transfer rate, this might place others used in a particular song further away, resulting in more read/write head activity to access them.
However, my plans were thwarted when I read the help file more closely, since O&O organise files in the opposite way to my desired placement, putting least-accessed files at the beginning of your drive. The rationale is that placing seldom-used files near the beginning makes future defragmentations quicker, as fewer files need to be checked and defragmented. As far as I could see, this is good for the future performance of the O&O utility but not for the musician, and sadly my email enquiry for more information remains so far unanswered.
I did try the Complete/Name strategy on my Windows partition, because this claims to speed up boot times, but on my (admittedly stripped-down) 5GB partition it made no measurable difference after 1.5 hours of file reorganisation. I also found setting up offline Jobs to perform the defragmentation of system files a confusing experience, and while most mainstream and business users will delight at the cleverness of the Activity Guard that monitors CPU usage, to ensure that you can always carry on working while defragging in the background, it again won't suit the musician who demands maximum performance from a PC for audio, and is far more likely to want to perform a defrag during downtime. Overall, I was impressed by Defrag 6.5, but at present I don't think it's the ideal product for the musician.
There's not much point in attempting to squeeze the last drop of performance from your drives if they're about to fail, and advance notice of this is always welcome. HDD Health from Pantera Soft (www.panterasoft.com) is a freeware 'failure-prediction agent' for hard drives that runs on Windows 95, 98, ME, 2000 and XP. Using the SMART (Self Monitoring And Reporting Technology) built in to all modern drives, it monitors various aspects of performance, such as spin speed and error rates, and attempts to predict impending failure. In the past I've always disabled SMART in my BIOS, because of the tiny extra overhead it imposes, but with faster modern drives this overhead ought to be almost undetectable.
Although HDD Health can sit in the System Tray and run in the background, you needn't worry about it impinging on your audio track count, since by default it only polls your drives once every 15 minutes, and you can easily disable it when required or just run it once and exit each time you log into Windows. If it detects any changes that suggest possible problems ahead, it can inform you via a pop-up message, email, net message or event logging.
I've been running this software for several weeks, and although sometimes its announcements of minor changes to one parameter (such as 'Seek Error Rate changes from 79 to 80') on one drive can become annoying, I'm happy to put up with this if it manages to give me notice of impending doom. One SOS Forum user has reported that one of his drives failed disastrously about a week after just such a warning, by which time he'd backed up all data and bought a replacement, just in case. Be warned!
However much I'd like to provide hard and fast answers to the whole subject of defragmentation, the reality is that some of you may rarely suffer from the effects of fragmented files, while others could run into them on a regular basis. Since installing Windows XP I've run the bundled Microsoft defragger every month or so on my Windows partitions, and more rarely on my data ones. Since I don't record huge numbers of audio tracks, this makes sense for me. However, those of you who regularly record multitrack audio (and particularly those who do so at 24-bit/96kHz or higher formats) would be well advised to at least check fragmentation levels on a weekly basis. If you find that your particular regime of recording, playback and editing results in noticeable fragmentation, running a defragger utility on a more regular basis is sensible. Some may notice immediate benefits after doing so, such as audio apps no longer momentarily dropping audio or even stopping altogether during the densest part of a song. It may also result in lower drive noise.
On the other hand, with already low fragmentation levels I can see little point in religiously defragging after every take. Unless your songs are beginning to push the technical limits of your hard drive you're unlikely to notice any improvement in track count if you do this. The one exception is if your drive has less than 30 percent free space. In this scenario, your maximum audio track count is more likely to drop because of fragmentation, and frequent defragging may help — although buying a larger drive is a preferable option.
Having established that defragging is beneficial for most of us at some time, we come to the choice of defragger utility. I personally find the bundled Windows one incredibly slow and tedious for drives larger than a few Gigabytes, and the various limitations discussed earlier further reduce its attractiveness. O&O's Defrag 6.5 might be an ideal candidate for those who want to explore user-configurable file placement, but although this has provided measurable performance benefits for some users, on behalf of musicians I wasn't convinced by the arguments. For me, Raxco's offering was much simpler to use, in both online and offline modes, and was particularly speedy. For those with huge audio drives, I suspect that will be the deciding factor.