A hardware RAID controller has its own memory that can hold data on its way to and from the drives. How the controller uses that memory, and whether the memory is protected against power loss, has a large effect on write performance and on what happens to your data in a power cut. This guide explains the cache policies on Dell PERC and HPE Smart Array and MR controllers and the role of the battery, supercapacitor or energy pack.
Before you start
- Check whether your controller has cache at all. Some entry models do not (see the table below).
- Check the battery or energy pack status before you change any write policy.
- Keep the server on a UPS. A power-protection plan is covered in server room power and UPS basics.
Write-back vs write-through
| Policy | When the host is told the write is done | Notes |
|---|---|---|
| Write-through | When the drives have received all the data | Slower for writes; no dependency on cache protection |
| Write-back | When the controller cache has received all the data; the controller writes to the drives later | Default for virtual disks on PERC 11. Needs a healthy battery or energy pack |
| Force write-back (Dell; listed as always write-back in the PERC 12 specifications) / Always Write Back (HPE MR) | As write-back, even without a working battery or energy pack | Dell advises a power backup system when forcing write-back |
HPE explains why write-back helps: the controller posts writes to high-speed cache and returns completion in microseconds instead of milliseconds, then combines small adjacent writes and reorders them before sending them to the drives. A full cache in a busy system gives the controller more chances to do this.
Why the cache needs protection
With write-back, acknowledged data can sit in controller memory before it reaches the drives. Dell's PERC 12 guide warns that data loss may occur after a system failure if the data has not been written to disk. Both vendors therefore pair the cache with backup power and flash:
- Dell PERC 11 uses a battery backup unit and non-volatile cache. On power loss, a small amount of battery power moves the cache contents to flash, where they stay until power returns and the system boots. If preserved cache exists at boot, the controller shows an error so you can recover it.
- Dell PERC 12 uses an Energy Pack: a battery on the H965 series and a supercapacitor on the H975i Front.
- HPE Smart Array SR and MR 400 series use flash-backed write cache (FBWC) with an energy pack (HPE Smart Storage Battery or Smart Storage Hybrid Capacitor). HPE notes that FBWC needs power only while copying DRAM to flash, so there is no longer a 48-hour energy pack limit, and the data is written to the drives at the next power-up.
What happens when the battery or energy pack fails
- Dell PERC 11 and 12: write-back is used whenever the battery or Energy Pack is present and in good condition. If it is declared failed, all write-back virtual disks change to write-through, and return to write-back after it is replaced. On PERC 11 the firmware also runs learn cycles on later reboots until the battery is replaced.
- Dell learn cycles: the PERC 11 battery runs a transparent learn cycle every 90 days, typically taking 4 to 8 hours, and virtual disks stay in write-back during it. On PERC 12 the supercapacitor learn cycle runs after every cold boot and every 24 hours.
- HPE Smart Array: the cache ratio can only be changed when the cache has backup power. The No-Battery Write Cache option lets some controllers enable write cache with no battery or a failed one; HPE's SSA CLI guide gives its default as disabled.
- HPE MR Gen11: the Write Back policy switches between write-back and write-through depending on controller status. If Always Write Back is selected and the energy pack is absent, HPE's guide says the firmware is forced to use the Write Back policy.
Warning: Forcing write-back without a working battery or energy pack means a power cut can lose acknowledged writes and corrupt the file system or database. Dell's caution is to use a power backup system when forcing write-back. Back up first, and fix the battery instead of forcing write-back where you can.
Read policies
- Dell PERC 11: Read Ahead reads sequentially ahead of requested data, which speeds up sequential reads but helps little with random data. No Read Ahead disables it. Adaptive read ahead is no longer supported; selecting it equals Read Ahead. Dell recommends the default Write Back and Read Ahead for hard-drive virtual disks.
- Dell PERC 12: the default read policy is No Read-Ahead. Read-Ahead is supported only on hard drives with write-back, on the H975 series and on H965 and H365 firmware 8.8.0.0.18-26 and later.
- HPE Smart Array: the controller cache is split between reads and writes. The default is 10% read and 90% write, which HPE calls the best ratio for most workloads.
- HPE MR Gen11: No Read Ahead (default) or Read ahead per logical drive, plus an I/O policy of Direct (default) or Cached.
ssacli ctrl slot=3 modify cr=25/75
This HPE example sets 25% read and 75% write cache. Change the ratio only if a workload is mostly sequential reads or reads of recently written data, as HPE suggests.
Controllers without a cache
| Controller | Cache behaviour |
|---|---|
| Dell PERC H355, H350 | No cache, no battery; write-through, no read-ahead |
| Dell PERC H365 series | No battery or non-volatile cache; write-through by default |
| HPE MR216i (MR Gen11 200 series) | No cache; energy pack not supported |
Software RAID and boot devices work differently again; see hardware vs software RAID.
Check cache and battery health
- Dell PERC 11: in the HII utility, Main Menu > Hardware Components > Battery Management shows type, status, temperature and charge. On PERC 12, use Main Menu > Energy Pack Management.
- HPE Smart Array (UEFI): System Configuration > controller > Configure Controller Settings, then the Backup Power Source screen shows Failed, Not present, Charging or Charged.
- HPE MR Gen11 via iLO: Power & Thermal > Power, then the Smart Storage Energy Pack panel. Details for HPE: HPE cache and energy pack.
Frequently asked questions
Linux says "assuming drive cache: write through". Is my cache off?
No. Dell explains that the PERC firmware manages cache per virtual disk and does not answer the Linux SCSI layer's cache query, so Linux assumes write-through. The cache policy and throughput are not affected. Dell also notes that all RAID volumes are presented to Windows and Linux as write-through, whatever their real policy.
Should SSD virtual disks use write-back?
Not always. Dell notes SSD virtual disks may see no gain from controller cache and recommends write-through with no read-ahead to enable FastPath. See SSD vs HDD arrays.
Checklist
- Confirm the controller has cache and a healthy battery or energy pack.
- Use write-back on hard-drive volumes when cache protection is healthy.
- Avoid forced or always write-back unless the server has reliable backup power.
- Expect volumes to drop to write-through if the battery or energy pack fails, and replace it promptly.
- Leave the HPE 10/90 cache ratio unless the workload is read-heavy and sequential.
- Monitor battery and energy pack status in iDRAC, iLO or the controller utility.
Skyline can supply, configure and maintain Dell, HPE and Huawei servers under an annual maintenance contract (AMC). Contact us.
Comments
0 total · 0 threads