ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

How to Optimize and Repair a Hard Drive

Updated on May 30, 2019


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
    • vinner profile image


      8 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.

    • fkagchel profile imageAUTHOR


      8 years ago

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

    • njmanura profile image

      Dr Manura Nanayakkara 

      8 years ago from Sri Lanka

      very useful hub, Hope to see more

    • Michael Graves profile image

      Michael Graves 

      8 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.


    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at:

    Show Details
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the or domains, for performance and efficiency reasons. (Privacy Policy)
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)
    ClickscoThis is a data management platform studying reader behavior (Privacy Policy)