Skip to main content

Does issuing a sync call flush an SSD's write cache? [Resolved]

Suppose I create a number of directories on SSD, then issue a "sync" call.

The sync call will guarantee that any writes, even if they are stored in the write cache, will be flushed to disk by the time the sync call returns, right?

Question Credit: jj172
Question Reference
Asked May 13, 2019
Tags: cache
Posted Under: Network
1 Answers

There is no real way to know that. Each drive may do different things and there is no one to keep the vendors accountable.

The enterprise drives will ensure that your data can be written to disk on power off with internal capacitors intended for this purpose. The consumer grade drives usually have no such guarantee and you are their mercy if their flush command implementation really does write the data to the media.

Your only way to know is to test the specific drives you intend to work with.

credit: Baruch Even
Answered May 13, 2019
Your Answer