Should SSD be Defragmented ?
Solid-state drives are different from the mechanical, magnetic hard drives in wide use. Many of the things youíve done with typical mechanical hard drives shouldnít be done with newer solid-state drives.
Solid-state drives are presented by the operating system the same way mechanical drives are, but they work differently. If youíre a geek, knowing what you shouldnít do is important.
You shouldnít defragment solid-state drives. The storage sectors on an SSD have a limited number of writes ó often fewer writes on cheaper drives ó and defragmenting will result in many more writes as your defragmenter moves files around.
Whatís more, you wonít see any speed improvements from defragmenting. On a mechanical hard drive, defragmenting is beneficial because the driveís head has to move over the magnetic platter to read the data. If a fileís data is spread out over the drive, the head will have to move around to read all the little pieces of the file, and this will take longer than reading the data from a single location on the drive.
On a solid-state drive, thereís no mechanical movement. The drive can simply read the data from whatever sectors it resides in. Solid-state drives are actually designed to spread data around the drive evenly, which helps to spread out the wear effect ó rather than one area of the drive seeing all the writes and getting worn down, the data and write operations are spread over the drive.
Assuming you use an operating system that supports TRIM ó Windows 7+, Mac OS X 10.6.8+ , or a Linux distribution released in the past three or four years (Linux kernel 2.6.28+) ó you never need to overwrite or ďwipeĒ your free sectors. This is important when dealing with mechanical hard drives, as files that are deleted on mechanical hard drives arenít actually deleted immediately. Their sectors are marked as deleted, but until theyíre overwritten, the data could be recovered with a file-recovery tool like Recuva.
To prevent this from happening when disposing of a PC or hard drive, people use tools like DBAN or the Drive Wiper tool in CCleaner to overwrite the free space, ensuring itís full of unusable data.
On operating systems that support TRIM, files are deleted immediately. When you delete a file in your operating system, the OS informs the solid-state drive that the file was deleted with the TRIM command, and its sectors are immediately erased. Your data will be deleted immediately and canít be recovered.
Some old SSDs donít support TRIM. However, TRIM was added shortly after SSDs hit the market. Unless you have a very early SSD, your drive should support TRIM.
Donít Use Windows XP, Windows Vista, or Disable TRIM
If your computer is using a solid-state drive, it should be using a modern operating system. In particular, this means you shouldnít use Windows XP or Windows Vista. Both of these old operating systems do not include support for the TRIM command. When you delete a file on your hard drive, the operating system canít send the TRIM command to the drive, so the fileís data will remain in those sectors on the drive.
In addition to allowing for theoretical recovery of your private data, this will slow things down. When your operating system tries to write a new file to that free space, the sectors must first be erased, then written to. This makes file-write operations take longer and will slow down your driveís write performance.
This is also why you shouldnít disable TRIM on Windows 7 and other modern operating systems. Itís enabled by default ó leave it that way.
Donít Fill Them to Capacity
You should leave some free space on your solid-state drive or its write performance will slow down dramatically. This may be surprising, but itís actually fairly simple to understand.
When an SSD has a lot of free space, it has a lot of empty blocks. When you go to write a file, it writes that fileís data into the empty blocks.
When an SSD has little free space, it has a lot of partially filled blocks. When you go to write a file, it will have to read the partially filled block into its cache, modify the partially-filled block with the new data, and then write it back to the hard drive. This will need to happen with every block the file must be written to.
In other words, writing to an empty block is fairly quick, but writing to a partially-filled block involves reading the partially-filled block, modifying its value, and then writing it back. Repeat this many, many times for each file you write to the drive as the file will likely consume many blocks.
As a result of its benchmarks, Anandtech recommends that you ďplan on using only about 75% of its capacity if you want a good balance between performance consistency and capacity.Ē In other words, set aside 25% of your drive and donít write to it. Only use up to 75% of your driveís free space and you should maintain ideal performance. Youíll see write performance start to slow down as you go above that mark.
Donít Write Constantly To Them
To increase your SSDís life, you should try to minimize writing to the drive as much as possible. For example, you can do this by tweaking your programís settings and having them write their temporary files and logs elsewhere, such as to a mechanical hard drive if you have a mechanical hard drive in your computer.
Tweaking such application settings will be going overboard for most users, who shouldnít have to worry about this. However, you should nevertheless bear this in mind ó donít run applications that have to write temporary files to the drive constantly. If you do use such applications, you may want to point them at a mechanical hard drive where you wonít have to worry about the drive being worn down.
Donít Store Large, Infrequently Accessed Files
This one is fairly obvious. Solid-state drives are smaller and much more expensive per-gigabyte than mechanical hard drives are. However, they make up for it with reduced power consumption, less noise, and increased speed.
Ideal files to store on your solid-state drives include your operating system files, programs, games, and other files that must be accessed frequently and quickly. Itís a bad idea to store your media collection on a solid-state drive, as the speed isnít necessary and youíll use up much of your precious space. If you donít have enough space on your SSD, store your large media collection on a mechanical hard drive. If you use a laptop, consider getting an external hard drive for your media. Mechanical hard drives are still very good at providing a very large amount of storage at a low cost per-gigabyte