I was wondering if having less than 5-10GB of free space on an SSD would affect performance. Is it specific to SSD or is it more of an operating system aspect?
For example, on an Intel X-25 G2 that has TRIM support (on Windows 7).
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
Most SSDs will slow down as they fill up. SSDs tend to chose empty blocks to write in, since they can only modify a block by erasing and re-writing the entire block. Once all of these blocks are partially filled, then every write operation will require an erase and rewrite, meaning the SSD has to read the block into cache, modify the cache with the new data, then erase the block and write the cache. This comes out to one read and two programming operations for each block that needs to be modified. Also, though fragmentation has very little effect on SSDs, high fragmentation and the fact that most OSes are ignorant of SSDs can cause the OS to issue more writes than needed. The SSD's blocks are usually larger than the OS's allocation units, so if the SSD is not expecting the extra writes, it could end up repeating the same three-step process multiple times per block, thus slowing down writes even more. Even deleting files does not solve this issue, because the data remains there, and the SSD doesn't know that it is no longer used, and continues rewriting this deleted data.
The TRIM operation, which your drive supports, allows the OS to tell the drive to get rid of the deleted data. This allows the drive to reclaim empty blocks. However, the only operating systems that support TRIM are Windows 7, Windows Server 2008 R2, and Linux distributions using kernel 2.6.33 or later.
Since you have Windows 7, your system is using the TRIM command, and is able to reclaim the unused blocks. However, TRIM does not rearrange the data, so if the drive is close to full, high fragmentation can still cause data to partially occupy blocks, and limits TRIM's effectiveness. The best thing to do as far as I can tell is to free up as much disk space as you can. If you can free up enough space, then full blocks can be trimmed and your drive will get some speed back. Also, there are defragmentation programs that are geared towards SSDs, meaning that they will only defragment enough to trim a few extra blocks, but I don't know of any free ones. I think Diskeeper is supposed to do this, but it's expensive and I've heard very mixed reviews.
In this excellent article at AnandTech, they explore the relationship between the spare area and the SSD performance. The bottom line is that all SSDs gain/keep performance when leaving some of their space unused. Sometimes there's even a difference between 25% free space and 50% free space.
Filesystems in general get slow when they get full. It's due to fragmentation. On an empty disk, you can be sure that you can write a file in one block. As the filesystem gets fuller, then the chances of being able to fit the file into a single contiguous block decreases, and you're having to do more and more seeks to find the data, converting what was originally a sequential access of data into a more like a random access of data, and thus slower.
Another important factor is if and how much over-provisioning is set by the SSD manufacturer, as explained here. Over-provisioning means that some space is reserved for background activities such as garbage collection, and not made available to the user. For example, an SSD advertised as 256 GB may actually be 282 GB if 10% over-provisioning is set.
If the SSD manufacturer has been generous with over-provisioning space, low disk space may not affect the performance greatly, e.g. even an SSD that appears 100% full may actually be only 85% full. But if you are able to actually fill your SSD close to 100%, that would cause a significant performance degradation.
In short, the amount of the effect and whether it will be noticeable is SSD specific. But as a general rule, SSDs perform best when they are mostly empty and their performance deteriorates as they fill, for reasons explained in other answers and in the link.