Why Your SSD is Slowing Down and How Windows Write Caching Could Save the Day

Written by xquatrox on Sat, Sep 8, 2018 4:17 PM

Recently I felt that my PC was not performing to its fullest. Steam started taking a long time to allocate storage for game installs, the system itself didn't feel as snappy as it once did. I decided it was time to check how the SSD performs.

For the longest time, I considered that I knew enough about how SSDs work to get me by - and that certainly was the case for a few years. I am sure you fine folks are in the same boat. Even after all these years though, a curveball can hit you when you least expect it.

And, sure enough after testing the SSD, this is the speed I was greeted with on my shiny Samsung 950 Pro 512GB NVMe M.2 SSD:

And, for point of comparison, here is out this exact same drive should be performing.

In the top drop-down boxes, the 5 and 6 refer to the number of runs through the test. The more runs performed, the more accurate the results are. Three is usually plenty. The second number is the size of the file. The smaller this size, the faster the test will complete, although smaller file sizes can lead to false results. 1GB should generally be enough though, as in the example below. 

A similar case was happening with my other SSDs, with write speeds varying between 35MB/s and 120MB/s, depending on the drive in question. It's widely known that the more full an SSD is, the slower its performance becomes, but the difference in performance here is clearly more significant than some minor slow-down.

So what gives? Were they dying? I tried updating my SATA and NVMe drivers; updating the chipset drivers; made sure TRIM is enabled; made sure the drives are optimized; made sure nothing was hogging the resources; checked the health of my drives using Samsung's own software, etc. I couldn't figure it out!

This is where I did what every one of us would do and I delved into the online depths (both GD and our old pal Google) to see if I could figure this one out somehow.  

I ended up re-reading an SSD optimization guide online - everything was, seemingly, fine and dandy my end. But I decided to turn off a setting called "Enable write caching on the device" as I thought maybe that's what's causing a problem.

Nothing changed.

For some reason, after a bunch of googling, I decided to enable it again - It couldn't hurt, I thought. After a benchmark - my SSD speeds were back to normal!

Excited and nearly filling my pants with joy I disabled and re-enabled the cache on all drives and now I'm all good again!

Interestingly, this was the case as well when booting from an external drive running Windows 10 LTSB (Long Term Servicing Branch), which I tested to make sure a different set of drivers and software is used and that the drive is not affected by the host system's potential corruption. I got the same results - painfully slow write speeds with the cache disabled and normal "magazine shot" speeds with it enabled. But what gives?! What is this "write cache"?!

To illustrate further, here's a comparison on a Samsung 960 EVO 1TB drive. These drives are known to be MUCH better than the 950s, but they still exhibit a big drop if the cache is off:

Write Cache OFF

Write Cache ON

 

This is where I got a lot of confusing information!

Many websites and forum posts and even GD's own Tzzsmk said write cache uses system RAM to write the data so that write calls can be dealt with quickly, leaving the slow drive to write in the background. It sounds logical on paper. But it's not really. Because if this was the case - we'd be seeing read/write speeds of 10GB/s and upward - in line with system RAM transfer speed - which is precisely the case if you enable RAM caching (RAPID) via software like Samsung Magician. What you see instead is just the normal advertised speed. So how does that work?

Apparently, the "Enable write caching on the device" setting looks at each drive and determines whether it has its own write buffer (cache). If so, it uses that and gives you an option for it. (Here's a link to Microsoft's own documentation). Now, this makes much more sense - this is why we don't see the RAM speed when writing into the disk - we see the speed of the cache/buffer.  

This was supported by a review on PC World I found where the author was getting the same sluggish 35MB/s write speed before installing NVMe drivers for the same SSD as mine, proving the driver is necessary for Windows to see the cache and use it.  

Now the confusion, I assume, stems from the fact that SSDs also use DRAM memory as a fast cache - it is easy for anyone to confuse this with DRAM used as *system* memory (RAM), thus the plethora of confusing information online.

But why is this interesting and important?  

1) SSDs generally appear to use much slower NAND for actual long-term storage. I've seen write speeds of 35-70MB/s, sometimes more, depending on the drive - nothing close to what's on the box.

2) Read speeds are, arguably, the important ones. These are generally unaffected by the caching setting, but benchmarks do show an improvement there too.

3) It's generally believed that SSDs use caching on their own, internally, regardless of the OS settings. This is wrong, as shown by testing and the information available.

4) Large, sustained writes will slow down dramatically once the cache is full. How large the cache is, depends on the manufacturer and the particular SSD model. But, once it runs out, and it will at some point (especially on cheaper drives) - your file copy will slow until the file copy is finished. See the image below for a scenario I created myself to illustrate the issue. The speed drops once the total data written hits about 8GB.

5) The cache may be using volatile DRAM (similar to your system RAM) and, therefore, you might lose data if the power to the device gets cut off before the cache is dumped onto the long-term NAND storage. In other words, the system will tell you that your file copy is done, but there's a short time period during which the cache is being emptied onto the storage cells. If your PC suffers a power cut or you unplug the SSD (say, you may be using an external one) - data loss may occur. Windows even warns you about this right there in the setting.

So, there you have it, folks! The curious case of SSD tech - how it can fail either on Windows, via user fault or a driver error - and how it all really works.

Login or Register to join the debate

Rep
4
Offline
09:54 Sep-10-2018

i wanted to find out how big my plextor 256M8PeGN chach was but how can i test it? in your image your slowed down speed is 170. i transfer a 18gb file from hdd to ssd but to begin with was 150MB/s at full speed. do i need a ssd to ssd?

0
Rep
272
Offline
admin approved badge
19:49 Sep-10-2018

My method was literally just creating a 30GB file inside the SSD and copy-pasting it (creating a clone). I saw the full write speed for the first 8GB or so, then it slowed down to 170MB/s.
With that in mind - if you copy something from a HDD - the HDD will be the bottleneck, most likely, because the good ones reach around 200MB/s read tops. So you need SSD to SSD (if you're testing SATA) or do it within the same SSD. In other words - try to eliminate bottlenecks (which in your case was copying from a slower drive onto a faster one).

0
Rep
4
Offline
17:54 Feb-17-2020

After all that time it happened to me! first time to search was that thread of gamedebate cause i didn't remember what you did. and it worked for me. i wonder what happen though

1
Rep
272
Offline
admin approved badge
15:52 Apr-29-2020

Oh wow, almost 2 years after the publish date!
Yeah, I have no clue what happens, but after a while the SSDs kinda slow down a lot...

0
Rep
4
Offline
06:42 Sep-10-2018

but this story is only with the old 950 series. The 970 rocks full speed after years

0
Rep
272
Offline
admin approved badge
09:29 Sep-10-2018

The 970 series only came out a few months ago. How can you say that it runs "full speed after years"?
That being said, the problem isn't with any SSD in particular - my case was Windows screwing up the caching system, which can affect pretty much any SSD model.

1
Rep
1,041
Offline
senior admin badge
17:58 Sep-09-2018

glad you decided to write the full article after exploring and fixing the issues :)

0
Rep
272
Offline
admin approved badge
20:25 Sep-09-2018

There was too much time and discussion put into this to not share it somewhere :D

0
Rep
1,041
Offline
senior admin badge
11:36 Sep-11-2018

yup totally haha xD

0
Rep
5
Offline
15:27 Sep-09-2018

I wasnt able to find policy setting on mine, maybe cause mine is a 950 PRO?

0
Rep
272
Offline
admin approved badge
15:59 Sep-09-2018

Hi! It's THIS you need to click on to get the policy tab :)
I need to ask Jon to include it in the article, since I seem to have missed it, lol.
The cache is enabled on Windows by default if your drivers are installed and working properly.

0
Rep
383
Offline
senior admin badge
15:07 Sep-10-2018

Sorry! Added it in now

1
Rep
272
Offline
admin approved badge
19:49 Sep-10-2018

Awesome, thanks, Jon :)

1
Rep
10
Offline
11:46 Sep-09-2018

EXCELLENT article buddy, it is very well laid out and clear. I have already showed it to ma friend of mine who is a noob and he was able to follow and understand it all, so noob friendly - YES.


Have a ‘Thumbs Up’ for this in-depth and useful article


All the best


SySt3m V0ID

1
Rep
272
Offline
admin approved badge
14:09 Sep-09-2018

Thank you for the kind words! Glad you enjoyed my first-ever publishing :)

2
Rep
97
Offline
00:47 Sep-09-2018

I'm waiting for tzzsmk to come and spread bs on Windows


Write cache is on by default for me.

6
Rep
191
Offline
junior admin badge
07:31 Sep-09-2018

Maybe someone can see if there there is a similar situation on Linux.

0
Rep
272
Offline
admin approved badge
14:11 Sep-09-2018

We already had a long debate on this when I was trying to figure out what's going on with my SSDs. I think he had to concede that SSDs don't cache with RAM and are fairly slow to write without the internal cache.

2
Rep
1,041
Offline
senior admin badge
11:36 Sep-11-2018

nah I'm fine, actually will try to run some tests on MacOS, as the cache is probably working a bit differently,
and actually it did surprise me the SSDs are not actually that fast without caching, there's always something new to learn every day :D

1
Rep
191
Offline
junior admin badge
18:38 Sep-08-2018

Great article.
Thank you for taking the time to write it in detail.
:)

0
Rep
272
Offline
admin approved badge
20:50 Sep-08-2018

Cheers :)

2
Rep
13
Offline
18:13 Sep-08-2018

Maybe I missed something, but why was it worse before and why did it get better by turning it off and on again?

0
Rep
49
Offline
admin approved badge
18:24 Sep-08-2018

Might be a windows problem, glitch sort of speak. Was on but was probably being read as off. It happens sometimes.

0
Rep
272
Offline
admin approved badge
20:51 Sep-08-2018

I think it was a glitch that made the caching not work. Maybe a windows or a driver update. You never know with these things.

0
Rep
7
Offline
17:06 Sep-09-2018

I was about to ask the same thing. You didn't really give an explanation on the first thing you observed with your SSDs @Xquatrox. The rest of the article is great though!

0
Rep
272
Offline
admin approved badge
20:25 Sep-09-2018

First article I've ever contributed! Duly noted for the future :)

0
Rep
1,041
Offline
senior admin badge
11:34 Sep-11-2018

I'm pretty sure you can contact Jon or Felix if you'll want to update the article with further observations ;)

0
Rep
70
Offline
18:02 Sep-08-2018

if i go in to hardware and properties, the " policies " tab is missing. is this because of my drive?
its a crucial MX500 1TB SSD

0
Rep
133
Offline
junior admin badge
18:08 Sep-08-2018

use Device Manger

1
Rep
70
Offline
18:14 Sep-08-2018

ah, thanks. that worked.

1
Rep
61
Offline
18:10 Sep-08-2018

Go to the "general" tab and click on "Change settings". The Policies tab should appear now.

4
Rep
272
Offline
admin approved badge
20:52 Sep-08-2018

As Executer said - you have to do the "Change Settings" thing to get admin access to the new tab.

2
Rep
49
Offline
admin approved badge
17:55 Sep-08-2018

I dont have that option for my kingston ssd.


Solved. Yea nvm i found it, only works if you do it thru device manager. Mine is already enabled.

0
Rep
272
Offline
admin approved badge
20:52 Sep-08-2018

You also need to press "Change Settings" to get admin access to the Policies tab. I should have probably included that bit, since a few people asked :)

0
Rep
49
Offline
admin approved badge
00:55 Sep-09-2018

Yea i didn't have that, I'm already admin anyways but i had no such option. Mine was on default so not an issue. I've already done other ssd tweaks ages ago so i'm guessing it's still fine. I wonder if this makes any difference to HDDs though.

0
Rep
272
Offline
admin approved badge
14:13 Sep-09-2018

It's THIS you need to click on :)
The cache is enabled on Windows by default if your drivers are installed and working properly. Just that in my case it crapped out for some reason :D

0
Rep
133
Offline
junior admin badge
17:53 Sep-08-2018

Pretty in depth Info ill try it with my ssd
Thx Mr X

0
Rep
272
Offline
admin approved badge
20:26 Sep-09-2018

Glad you like it :)

0
Rep
105
Offline
17:38 Sep-08-2018

The speed of 132MB/s seems good, my HDD can barely do 20 MB/s xD.

0
Rep
272
Offline
admin approved badge
20:53 Sep-08-2018

Two things:
1) Defrag - heavily fragmented drives are slow
2) One sign of a drive approaching the end of its life is slowing down for no reason.

0
Rep
1
Offline
06:02 Sep-14-2018

Using RAIDs (0 in my case) and good hard drives you can achieve 220 MB/s

0
Rep
20
Offline
17:25 Sep-08-2018

maybe I missed something but wasn't it performing badly even with this option enabled


and didn't regain its old performance until you disabled it then reanbled it ?


was it a problem of it appearing to be enabled but not actually working ? a windows bug maybe ?

0
Rep
272
Offline
admin approved badge
20:54 Sep-08-2018

I'm not sure, to be honest. It could have been a driver bug, could have been a Windows or some other software bug... But definitely a glitch somewhere!

0
Rep
94
Offline
17:08 Sep-08-2018

Hmm, no matter what, it still takes about 30 sec to turn off my pc. I blame the latest windows 10 updates since spectre.

2
Rep
272
Offline
admin approved badge
20:55 Sep-08-2018

Are you running a bunch of stuff in the background? Windows has to turn quit all the programs before it can safely shut down, so that might be one thing to investigate.

0
Rep
94
Offline
21:49 Sep-08-2018

Hmm, on the performance tab at cpu it shows around 134 services (with chrome opened atm).

0
Rep
272
Offline
admin approved badge
14:17 Sep-09-2018

Hmm, that's not a lot. Mine clocks in at 165-191 processes on average and it is still fast to shut down the PC. Could be the CPU? But then again, a crappy laptop I have for legacy gaming shuts down even quicker than my PC (though it does have a fairly clean install of Win7).

0
Rep
1
Offline
16:35 Sep-08-2018

thanks

5
Rep
272
Offline
admin approved badge
20:56 Sep-08-2018

Hope you found it informative :)

1

Can They Run... |

| 60FPS, Medium, 1080p
Ryzen 5 4600H 6-Core 3.0GHz GeForce GTX 1650 16GB
| 60FPS, Medium, 1080p
Ryzen 5 3600 6-Core 3.6GHz GeForce GTX 1070 Asus ROG Strix Gaming OC 8GB Edition 16GB
| 60FPS, Ultra, 1080p
Ryzen 5 5600X 6-Core 3.7GHz GeForce RTX 3070 Gigabyte Eagle OC 8GB 16GB
100% Yes [1 votes]
Ryzen 5 2600X 6-Core 3.6GHz GeForce GTX 1050 Ti 4GB 16GB
Core i7-7700K 4-Core 4.2GHz GeForce GTX 970 EVGA SSC ACX 2.0 4GB Edition 32GB
| 60FPS, Medium, 1080p
Core i5-9400 6-Core 2.9GHz GeForce RTX 2060 Super Palit Dual 8GB 16GB
| 30FPS, Medium, 1080p
Core i5-4690 3.5GHz GeForce GTX 1650 EVGA SC Ultra Gaming 4GB 16GB
0% No [2 votes]
Core i5-4690 3.5GHz GeForce GTX 1650 EVGA SC Ultra Gaming 4GB 16GB
0% No [1 votes]
| 30FPS, Low, 720p
Core i7-4702MQ 4-Core 2.2GHz GeForce GT 750M 8GB
100% Yes [1 votes]
| 60FPS, High, 1080p
Core i7-2600 4-Core 3.40GHz Radeon RX 580 8GB 16GB
100% Yes [1 votes]
| 60FPS, Low, 1080p
Core i5-7300HQ 4-Core 2.5GHz GeForce GTX 1050 16GB
| 60FPS, Low, 1080p
Core i5-7300HQ 4-Core 2.5GHz GeForce GTX 1050 16GB
| 30FPS, Medium, 720p
Ryzen R5 1600 Radeon RX 580 8GB 16GB
100% Yes [1 votes]
Core i5-9500 6-Core 3.0GHz UHD Graphics 630 8GB
| 60FPS, High, 1080p
Core i5-4670 3.4GHz GeForce GTX 1650 16GB