Sign in with
Sign up | Sign in
Your question

Disabling on disk write cache of SSD

Last response: in Storage
Share
January 4, 2010 8:10:31 PM

Hi,

I bought an MTRON PRO 7500 SATA SSD some time back and I decided to disable its on-disk write cache inorder to check its performance. I use ubuntu, and when I issued the following command:

$ sudo hdparm -W0 /dev/sdc

I received the following message

/dev/sdc:
setting drive write-caching to 0 (off)
HDIO_DRIVE_CMD(setcache) failed: Input/output error
write-caching = 1 (on)

For some reason, it is refusing to switch off the on disk write cache. I was able to disable/enable on-disk write cache of a hard disk using the hdparm command without facing any problems. So I believe this is something related to the SSD itself and its internals. Did anyone face similar problem before?


Rishi
a b G Storage
January 6, 2010 6:29:30 AM

Errr, isn't this something that belongs to the Linux section of the forum? :( 
m
0
l
a b G Storage
January 6, 2010 7:10:16 AM

Are you sure the drive even has a cache? Not all SSDs do...
m
0
l
Related resources
January 6, 2010 1:21:08 PM

r_manic said:
Errr, isn't this something that belongs to the Linux section of the forum? :( 


I'm sorry.. I'm new to this forum. I didn't see a linux subsection in storage section. So, I just created the thread in storage. If this discussion really belongs to a different section.. can anyone please help me on how to move this thread to that section?
m
0
l
January 6, 2010 1:46:00 PM

cjl said:
Are you sure the drive even has a cache? Not all SSDs do...


True, not every SSD may have a disk-write-cache. Also, I think its very difficult to guess which ones have a write cache coz we seldom know their internals. (Perhaps, by opening the device we may be able to find out .. but still we will not know whether the disk-controller uses a write-through or write-back caching scheme.)

I think the MTRON SSD does have an on-disk write cache. I wrote a program to measure the smallest latency that we see when we read/write a page. I wrote a lot of pages to /dev/sdc (opened with O_DIRECT | O_SYNC) and I found that the smallest latency observed is around 90 microseconds for both read and write. I think 90 microseconds is too small to allow page read/write from/to flash and be able to transfer it along the bus.

Also, the device was pretty expensive. When I bought it, it was 750$ for a 32GB one. (More than 20$ per gb.) I believe they have an on disk write cache coz thats the easiest way to come up with very good performance numbers. Further, most (or may be all) medium to high end SSDs will have on-disk cache to handle the "erase a block of pages, write a single page" scheme that flash-memory uses.

The MTRON's after buy support really sucks. After a lot of search, I was unable to find a phone number to call them on .. but found a technical help link where we can post a question. I posted the question of how to disable disk-write-cache 3 days back, and I haven't heard from them yet.
m
0
l
January 27, 2010 12:25:09 AM

Mtron do have a cache. This is what made them better, along with the microcode.

The cache is so important to an Ssd that I can imagine Mtron's microcode refusing to disable it. For performance, but also for life expectancy.

90µs is achievable as a Flash read latency (and would be excellent still today) but by no way as a write latency (around 20ms with Slc). What you see is a Ram write, with the controller waiting to have a full block to write to Flash.
m
0
l
!