Re: New server: SSD/RAID recommendations? - Mailing list pgsql-performance

From Heikki Linnakangas
Subject Re: New server: SSD/RAID recommendations?
Date
Msg-id 559C2E31.4060107@iki.fi
Whole thread Raw
In response to Re: New server: SSD/RAID recommendations?  ("Wes Vaske (wvaske)" <wvaske@micron.com>)
Responses Re: New server: SSD/RAID recommendations?  ("Graeme B. Bell" <graeme.bell@nibio.no>)
List pgsql-performance
On 07/07/2015 09:01 PM, Wes Vaske (wvaske) wrote:
> Regarding:
> “lie about their fsync status.”
>
> This is mostly semantics but it might help google searches on the issue.
>
> A drive doesn’t support fsync(), that’s a filesystem/kernel process. A drive will do a FLUSH CACHE. Before kernels
2.6.<lownumbers> the fsync() call wouldn’t sent any ATA or SCSI command to flush the disk cache. Whereas—AFAICT—modern
kernelsand file system versions*will*  do this. When ‘sync’ is called the filesystem will issue the appropriate command
tothe disk to flush the write cache. 
>
> For ATA, this is “FLUSH CACHE” (E7h). To check support for the command use:
> [root@postgres ~]# smartctl --identify /dev/sdu | grep "FLUSH CACHE"
>    83     13          1   FLUSH CACHE EXT supported
>    83     12          1   FLUSH CACHE supported
>    86     13          1   FLUSH CACHE EXT supported
>    86     12          1   FLUSH CACHE supported
>
> The 1s in the 3rd column represent SUPPORTED for the feature listed in the last column.

Right, to be precise, the problem isn't the drive lies about fsync(). It
lies about FLUSH CACHE instead. Search & replace fsync() with FLUSH
CACHE, and the same question remains: When the drive breaks its promise
wrt. FLUSH CACHE, does it nevertheless guarantee that the order the data
is eventually flushed to disk is consistent with the order in which the
data and FLUSH CACHE were sent to the drive? That's an important
distinction, because it makes the difference between "the most recent
data the application saved might be lost even though the FLUSH CACHE
command returned" and "your filesystem is corrupt".

- Heikki



pgsql-performance by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: New server: SSD/RAID recommendations?
Next
From: "Graeme B. Bell"
Date:
Subject: Re: New server: SSD/RAID recommendations?