Skip to content
WebsiteHosting.com

concept Servers & hardware

Power-loss protection and device write caches

An acknowledged write has persistence evidence if it reached persistent media, a compliant flush or FUA completed for it, or verified power-loss protection covered its cache entry. A volatile-cache acknowledgment alone is not enough.

Latest recorded source check · P0217

What it means

A device can acknowledge a write while the data is still in volatile cache. That acknowledgment tells you the device accepted the write; by itself, it does not tell you the data will survive power loss. Linux write-cache documentation and PostgreSQL storage reliability describe this distinction.

On a device that honors the command, a successfully completed flush establishes persistence for earlier writes within its scope. A write using force unit access (FUA) has a narrower guarantee: successful completion establishes persistence for that write, not for unrelated earlier writes. Linux flush and FUA semantics

Try it

This is a local simulation, not a hardware power-loss test. With Device command semantics set to compliant, follow two writes up to the moment power fails:

Power-loss protection and device write caches

Move synthetic writes across host, volatile device cache and persistent media; vary flush completion and explicitly specified protection evidence.

Simulation

Local simulation only: no device, service, stored object or database is changed, and no real operation is authorized.

Computed under the stated assumptions

Persistence evidence comes from media, a completed compliant flush/FUA, or explicitly verified protection of the acknowledged device cache. Host-only data is outside a device flush.

Power-loss protection and device write caches: synthetic scenario inputs

Scenario: Starting example

Each preset replaces all fields. Editing any field preserves the other values exactly, including invalid entries.

Acknowledgment and persistence are separate

Write 1, then write 2 acknowledged
Yes · Yes
Write 1, then write 2 persistence evidence
established · not-established

Evaluated evidence

Write 2 location or completion
volatile-ack
Device flush state
not-issued
Acknowledged-cache protection
none
Device command semantics
compliant
Write 1 baseline
media

Declared device assumptions; not a hardware power-loss test. Not established does not mean definitely lost. This is not Linux page-cache writeback or a WAL ordering model.

About this model

Every input is local synthetic evidence. Numbers stay as raw text until this model validates them. The shown evaluated values come from the same result as the explanation.

Presets replace the entire scenario. Reset restores all starting fields, scenario selection and model state; it does not change the open or closed state of this help or article FAQ.

No external request, device command, stored-input history or measurement is performed.

  1. The device has acknowledged W1, and W1 has reached persistent media.
  2. The device accepts W2 into volatile cache and acknowledges it. This is volatile-ack under Write 2 location or completion.
  3. Power fails with Device flush state set to not-issued and Acknowledged-cache protection set to none.

Both writes have an acknowledgment. Persistence is established for W1 because it reached media, but not-established for W2 because the evidence stops at volatile cache. That is not a finding that W2 was lost.

Choose Complete the compliant device flush. W2 was already acknowledged; the new evidence is that a flush covering W2 completed before power failed. Persistence is now established for W2. Change only Device flush state to in-progress, and W2 returns to not-established: issuing the flush is not the same as completing it.

Now choose Inspect the evidence boundary. No flush was issued, but this time the device has a power-loss protection (PLP) label. With label-only, the result is unknown: the label does not establish whether working protection covered the cache that held W2. Change Acknowledged-cache protection to verified-for-acknowledged-cache, and persistence is established for W2 on the strength of that protection, not because W2 is known to have reached media.

Device command semantics must be compliant for the model to establish persistence; the unknown setting leaves the result unknown. An unsupported choice is invalid input, not a storage failure. Reset returns all four inputs to the starting scenario.

In practice

First locate the write. If W2 is host-only, even a completed device flush cannot cover it: the device never received it. The simulation does not determine when the Linux page cache writes data back or how a database orders its write-ahead log.

For a write the device did acknowledge, look for the last event you can substantiate before power failed. If the evidence is a flush or FUA completion, check that the device honors the command and that the completion covers this write. If the evidence is PLP, check which cache was protected and whether that protection was working at the time. If the evidence ends at an ordinary volatile-cache acknowledgment, report that persistence is unproved—not that the write survived or that it was lost.

Frequently asked questions

Editorial questions based on the listed sources and explicitly labeled local examples.

Is an acknowledged write necessarily persistent?

Not when the acknowledgment covers only a volatile device cache. The example keeps acknowledged and established-persistent separate; lack of persistence evidence is not a claim that the data is definitely lost.

What does completed flush establish?

Under the declared compliant-device assumption, a successfully completed flush covers the writes within its persistence scope. An issued or in-progress flush is not equivalent, and it cannot cover bytes that never left the host.

Does every PLP label mean the same thing?

The model does not assume that. It requires explicitly verified protection of the relevant acknowledged cache, including applicability, rather than accepting a feature label as proof.

How is this different from the OS page cache?

This example starts at the host-to-device acknowledgment boundary and separates volatile device cache from media. It does not calculate Linux page-cache writeback timing or database WAL ordering.

Sources & model boundaries

Primary references used for this explanation. The interactive example is an educational model, not a live check.

  1. Explicit volatile write back cache control

    Introduction; REQ_PREFLUSH; REQ_FUA. Devices may acknowledge volatile cached data. Completed supported flush/FUA semantics establish the stated persistence boundary.

    Checked .

  2. PostgreSQL: Reliability

    Operating-system, controller and drive caches. Volatile controller or drive caches can break persistence assumptions; an acknowledged write is not automatically evidence of durable media.

    Checked .

Report an issue. Include the article URL and ID, not passwords or access keys.