hard drive - Does low disk space affect SSD performance?

07
2014-04
  • Gabe

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

  • Answers
  • TuxRug

    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.

  • ocsid80

    It depends on a specific SSD model, vendor and usage patterns.

    In some situations an intensively used SSD may deliver a significantly degraded performance disregarding of the amount of used disk space requiring a low-level wipe to restore to a like-new performance level.

  • Stefan Seidel

    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.

  • Ben

    I have heard that SSDs tend to slow down when they get nearly full, but I am guessing that it would need to have less than 5-10GB of free space left for you to feel anything like that. Maybe when you have less than 1GB left or something.

  • gorilla

    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.


  • Related Question

    osx snow leopard - MacOSX SSD potential performance issues (TRIM) with VM guest OSes
  • osij2is

    So, back in September of last year, I was pretty sure I was going to buy an SSD for my MacBook Pro (2009); here's my previous post. I decided to hold off and wait for Intel and OCZ to release their newer SSDs and my patience has paid off.

    Now, I'm at the purchasing point of buying the new SSD, however it's unclear to me whether MacOSX 10.6 has issues with TRIM and (more importantly) will running a Windows 7 VM will have any impact on the SSDs performance over time.

    Some posts that I've read specifically point out the degrading performance in OSX as it doesn't support TRIM. Other (Mac) posts say they've had no issues with degrading performance.

    So which is it and what's really going on? Will running Snow Leopard (10.6) without TRIM support with a Windows 7 VM be okay or not?


  • Related Answers
  • slhck

    I guess you'll be fine. The VM performance won't suffer since the data is ultimately written to the disk by OS X and not the VM itself. 10.7 will support TRIM by default. For 10.6, you can download TRIM Enabler from Oskar Groth's blog.