ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

How to optimize and repair a harddrive

Updated on September 14, 2016


In my first Hub called: “Everything you need to know about a Harddrive” I explained exactly how a harddisk works. This Hub is intended to explain how to optimize your harddisk to keep it running at good speed and good condition. Also how to repair if possible and if it’s necessary.

Optimization tips

Here are some optimization tricks and some guidelines you have to keep in mind to keep your harddisk running at peak performance level and here they are.

Clean up your harddrive

Temporary (Internet) files, recent documents, downloaded files and log files which belong to Windows are files that can build up very quickly. If your harddisk get’s fuller then it needs to be it will decrease in performance, because of the extra head movements. You need to delete all of the junk files to make Windows work at normal speed so it doesn’t need to work any harder. It is very important to keep your operating system (OS) running as clean as possible. Clean up old files and junk with the following software.

Windows XP/7 is equipped with build in drive cleaner that can be found here: Start -> All Programs -> Accessories -> System Tools and then Disk cleanup. You’ll see options like “Temporary Internet Files” and “Temporary files” which are the most disk space consuming things you can clean up.

Personally, I use the program CCleaner which is a more advanced and comprehensive utility to cleanup any harddrive. It also has some tools like uninstalling software, disable startup programs and checking and repairing registry error’s. There are 2 versions the 32-bit and the 64-bit version and they can be downloaded here:


Fragmentation is process when files are used in Windows. Windows store files in a contiguous way and attempts to keep the data as close as possible on the harddisk (tracks/sector’s). But Windows has to move data to different free space blocks when files are changed and resaved. Scattered file pieces over the disk could be the results if a typical file might be access. And so the disk has to work harder retrieving the file comprised of the pieces throughout the harddisk to assemble it as one total data file.

A very important task is to optimize Windows disk performance by defragmentation. File fragmentation will be corrected with defragmentation software that repair those scattering of file pieces. Over time in any file system like NTFS these scattering will occur sooner or later. Recommended time to defrag a drive would be at least once a month to prevent clutters. You can find Disk Defragmenter in Windows 7 here:

  1. Go to Start -> Search programs and files and type defrag.
  2. Left click on Disk Defragmenter
  3. The Disk Defragmenter program opens and click on “Analyze disk”.
  4. This analysis of the drive will let you know if a defragmentation is necessary based on the current fragmentation of the files.
  5. Click the Defragment button If the percentage of fragmented files show some percentage. The time it takes depends on how much data is on a drive and how much it’s fragmented. It could take some time so be patient!

Also for this task I use a more advanced and better optimized software program called Ultimate Defrag. This very handy piece of software optimizes the pc to the max.There are 4 things this very powerful tool accomplishes. First it defragmentes your files so the drive head movements are minimized while reading. Secondly it places your data files as far possible towards the outer tracks/sector’s because that’s the fastest part of the hard drive. Thirdly the files need to be place (consolidated) as closely together. This will minimize head movement and reduces the short stroking also called “seek confinement”. And fourthly most used data files are clustered together closely as possible and rarely used data files are placed out of the way.

So what this software does is put the data on the outside of the platters. Because the speed is greater at the outside of the platters this is where the data should be. The speed is faster at the outer platters because a disk is bigger and makes more turns outside then inside of the platter. It’s like a transmission on your bike, the bigger disks can give you a fast spin on the pedals and the small ones give you a slower tougher spin. You can download the trial version here:


NTFS is the best file system of choice on Windows XP/7. NTFS is much more comprehensive then FAT32 such as file management, NTFS and Share security, quotas, file compression. Also NTFS can recover from errors more readily then FAT32, if bad sectors are detected it will prevent them from using them and it remaps them. You’ll get the most out of your harddisk with NTFS, so if you are still using FAT32 it’s time to convert to NTFS.

Keep in mind when converting to NTFS:

  1. When you convert you can only convert from FAT32 to NTFS. Also you preserve your data during the conversion.
  2. If you want FAT32 back on a disk you have to reformat the disk! If you want a NTFS drive to FAT32 you can’t convert it back. The only way is to reformat your harddisk, but you’ll lose all of your data.

Do the following to convert your FAT32 drive to NTFS:

  1. Click Start -> search programs and files. Type “cmd” and right click on cmd.exe and click on “run as administrator”. You have to execute this command with administration permissions.
  2. The Convert command will be used to convert the FAT32 drive to NTFS. Remember your data will stay safe and exactly as it is. The command is:

convert C: /FS:NTFS then press Enter

This process takes some time (some minutes). The size of the drive and the data on it are depended how long it takes. When the conversion process is done exit the command interface. Windows will say it has to reboot if you converted a Windows boot partition/volume. Any disk you want to convert can be converted the same way just replace it with the letter of the disk you want to convert. C: is the default drive letter for the Windows disk but there are other letters you might want to convert to.

8.3 Filenames

Although very effective and powerful, NTFS has some overhead that could be unnecessary. To retain MS-DOS and Windows 3.x systems compatibility Windows has support for 8.3 filenames. 8.3 filenames mean files containing eight characters (which make the name). This eight character name is followed by a dot and also a three character extension. Usually this is not a problem but the overhead is not necessary. If you don’t have any old programs or file systems, you can turn this feature off. Because no long filenames (8.3) has to be created this can improve performance considerably.

MS-DOS programs are rarely used anymore so it’s fair to say you can turn this feature off. The dependency of some old programs on 8.3 filenames still exist, so if you turn it off it could be possible some programs won’t work correct anymore. At this point in time this is rare but keep this in mind.

8.3 names are enabled on every volume default. Disable it on all volumes or disable it on all with the exception of the system volume.

These are the values available as option to control the behaviour of the 8.3 naming feature:

0 = Enable 8.3 naming
1 = Disable 8.3 naming
2 = Enable 8.3 naming (creation on a per volume basis (default setting))
3 = Disable 8.3 naming (all volumes with the exception of the system volume)

Disable the 8.3 filename option through the register for all of your volumes follow these steps:

  1. Click Start -> Run. Type regedit and click OK.
  2. In the Registry Editor, navigate to
  3. Locate the NtfsDisable8dot3NameCreation entry and change the value to 1.
  4. Restart your pc

Also you can change the value by using the “fsutil” command:

1. Click Start -> Search programs and files type “cmd”, right-click and click on “Run as Administrator”
2. Type as follows:

fsutil 8dot3name set 0,1,2,3

Which value you want change it to that value (0,1,2 or 3).

3. Restart your pc

Master File Table

The Master File Table is used by NTFS to record data about files. Ensure it has enough space it requires with the use of a registry entry. Although more disk space is required for this it will reduce overall overhead, which will give you more performance.

Create or change the value:

  1. Click Start -> Run. Type regedit and click OK.
  2. In the Registry Editor, navigate to
  3. Create a REG_DWORD (32-bit) entry called NtfsMftZoneReservation
  4. Set the value to 2
  5. Close the Registry Editor and reboot your system

Date and Time Stamp Updating

When directories are used the date and time are recorded with the stamp feature of NTFS. Also the last time that it accesses a directory. Because there are a lot of directories this updating can cause a slowdown on your disk performance. When you disable this time and date stamping function, nothing will change when you work with all your files. To disable the dating and time stamping process do the following:

  1. Click Start -> Run. Type regedit and click OK.
  2. In the Registry Editor, navigate to
  3. Find the NtfsDisableLastAccessUpdate entry (create it if not found (REG_DWORD 32-bit))
  4. Set the value to 1
  5. Close the Registry Editor and reboot your pc

Hardware Settings

Bios AHCI vs IDE

IDE (Integrated Drive Electronics) is a standard interface used for a long time for optical devices and harddisks. SATA is substituted for IDE because it has a lot of advantages over IDE. One operation mode for SATA, the new AHCI (Advanced Host Controller Interface), which is an API (application programming interface) that is very useful. Its speed will not be affected by AHCI but it provides the harddisk to advanced technologies/features for SATA.

To support compatibility for older hardware, a SATA controller offers the choice for several operation modes through the bios. AHCI, IDE or RAID are those operation options, where IDE is also referred as legacy mode or native IDE mode. If you want your harddisk to operate like an older IDE disk choose IDE, but you won’t have all those great advantages of AHCI.

When you choose AHCI mode it will give you advanced features supported by SATA. Native Command Queuing or NCQ described in my other Hub called: Everything you need to know about a Harddrive is one of those technologies.

Hot plugging is another feature AHCI also enables, so you can remove and connect harddisks from or to a pc that is running in Windows just like a removable disk. With IDE drives or when you use IDE mode this won’t be possible, because the configuration is done prior to Windows and during boot time. You have to make your choice to whether use AHCI or IDE mode before installing Windows. This setting has to be changed in the setup of your bios, before you install the operating system on the computer.

RAID (Redundant Array of Independent Disks) mode is equal to ACHI mode but used when you use a RAID. A RAID array is several disk together combined as one.

DMA Windows settings

DMA (Direct memory access) allows system memory to be access independently without the CPU (central processing unit) to be access. Make sure DMA is enabled because this will smooth out performance immensely.

Go through the following steps to make sure it’s enabled:

  1. My Computer -> right click then select Properties
  2. Select the Hardware tab and then Device Manager
  3. Expand IDE controllers and double click the IDE primary channel
  4. Select the Advanced settings tab and make sure “Enable DMA” is selected
  5. Click OK then your computer needs to restart

Intel Rapid driver

The Intel driver provides acceleration of separate disks or raid arrays. Especially when you have a RAID this driver gives you a lot more performance. This driver is highly recommended when you use ACHI or RAID mode. When you install the driver left click on each hd and check if “Disk data cache” is enabled. Also you can see if Native command queuing is enabled (if supported by the disk) and what the SATA transfer mode is. SATA transfer mode is explain in my other hub called: Everything you need to know about a Harddrive.The latest Intel Rapid driver can be downloaded here:

Repair your harddisk

Checkdisk command

Check Disk typed as “chkdsk” command is a tool that can repair a harddisk. By scanning the MFT (Master File Table) and through an entire harddisk surface it finds problems. It scan’s for corruptions in the Master File Table (MFT) that has a list of all files (Metadata). Also when used with the switch /R it checkdisk can be used to detect and if possible repair bad sector’s.

All the switches for checkdisk are:

filename: FAT only. A specific file to check fragmentation. Allowed Wildcard characters (* and ?).

path: FAT only. Gives the file(s) location within a folder of a volume.

size: NTFS only. To be used with the switch /I. Provide the size of the log files to a desired kilobyte size. Must be used with the /l switch.

/c: NTFS only. Folder structure cycles checking skipped.

/f: Repairs errors on the volume. It's necessary for the volume to be locked. If the volume can't be locked down, the message to check the pc during the next restart will appear.

/i: NTFS only. A less intensive check of index entries.

/l[:size]: NTFS only. Shows the log file size currently. If size option is used, the log file will be changed to that size (kilobytes).

/p: Available only at the recovery Console, this switch will cause a disk to be checked without it being marked as a dirty disk (Recovery Console only).

/r: This switch searches and repairs bad sector's and makes information readable again (use /f and /p together). If it's not possible to lock down the volume, the message to check the pc during the next restart will appear again.

/v: On FAT: Every file on the volume will be displayed in full path and filename. On NTFS: Cleanup messages wil be shown if there are any.

/x: NTFS only. Will force to dismount the volume first if needed.

/b: NTFS only. This switch is only present from Window Vista/7. Bad clusters are cleared and reset then rescans all those clusters again for errors (same as /r).

/?: Provides you with a list of all the available switches to use with the checkdisk command.

  1. Click Start -> search programs and files. Type 'cmd' right click and and left click “run as administrator”.
  2. Type chkdsk /f and press enter. You see a message if you like to schedule this volume to be checked the next time the system restarts.
  3. Type Y for yes and reboot
  4. Now your system disk will be checked for errors during the next reboot

HDD LLF Low Level Format Tool

The process to prepare a harddisk for use is called formattting. You have to format a harddisk before you can use it.

Now sometimes when bad sectors or other problems arise a low level format can be used to correct problems. Positioning the tracks and all of its sectors to outline them to point out where those tracks and sector’s are, through structures that will be written is called a low level format. Because real physical formats are created that point out where data files can be stored this is also referred as a “true format operation”.

Usually this is not necessary because every modern day harddisk is low level formatted at the factory. But if for some reason you feel it needs a low level format to repair (for instants) bad sector’s, you can use free tool to accomplish this. HDD LLF Low Level Format Tool is such a tool also referred to as a zero fill utility because it restores a harddisk to a new condition again. You can download it here:

HD Tune

Is a very handy tool that can be used for several functions. The most important feature it has you can use it to scan for error’s on your harddisk (bad sector’s) and also benchmark it. Also a very important feature this software has is you can look at the status of your harddrive S.M.A.R.T. status. S.M.A.R.T. is explained in my other hub called: Everything you need to know about a harddrive.

Also you can change Automatic Acoustic Management (AAM) to change between less noice and less performance or more performance and more noise (of the harddisk) (value between 128 and 256). You can download HD Tune here:

Hdd Regenerator

Is a very powerfull tool that repairs bad sector’s in many cases. Other tools like the once you can get on the site of the brand of your harddisk only mark bad sectors, read data and when write back fails mark as bad sector permanently. Hdd Regenerator uses a technique called “magnetic reversal”.

Many bad sector’s are caused due to magnetic troubles therefore it can only repair those sector’s cause by magnetic troubles. It can’t repair physical damage to a drive! You can download the demo version and restore the first found bad sector here: If you want to restore a full harddisk you have to buy this software!


  1. Keep your harddisk as empty and as clean as possibly.
  2. Defragmentation if needed once or twice a month. If a lot of software is uninstalled or installed defragmentation is very smart.
  3. Use NTFS as a file system for you harddisk.
  4. Disable 8.3 filename creation when no old programs that need it are used.
  5. Increase the size of the Master File Table space.
  6. Set if possible the SATA mode to AHCI or RAID (if RAID is applied).
  7. Enable if possible DMA mode for all of your devices.
  8. If an Intel chipset is used install the Intel Rapid driver.
  9. To repair bad sector’s or check the Master File Table of your disk you can use the checkdisk command.
  10. If a Low Lever Format is needed for any reason use the HDD LLF Low Level Format Tool.
  11. Use HD Tune to check S.M.A.R.T status of your harddisk, check bad sector’s or change Automatic Acoustic Management settings.
  12. To regenerate your harddisk from bad sector’s or other problems use HDD Regenetor.


    0 of 8192 characters used
    Post Comment

    • Michael Graves profile image

      Michael Graves 5 years ago

      Very informative. I myself know very little about computers on the hardware side, so finding these tools, and tricks that I can use to optimize hard drive performance myself, was a real boon. Voted up.

    • njmanura profile image

      Dr Manura Nanayakkara 5 years ago from Sri Lanka

      very useful hub, Hope to see more

    • fkagchel profile image

      fkagchel 5 years ago

      Thank you both very much for your appreciation. Yes, you will see more hubs also related to the ICT and hardware.

    • vinner profile image

      vinner 5 years ago from India

      Wow very nice article. All doubt about hard disk can be cleared from one place. Thanks a lot. Eagerly waiting for more of your hubs.

    Click to Rate This Article