SCSI/ATA Power Management
Introduction
Power management for SCSI and ATA devices becomes important in mobile
and large server environments. Most of the devices discussed here have
interfaces
based on (draft) standards at www.t10.org
(SCSI) and www.t13.org (ATA). This
page attempts to give an overview of the terminology and the mechanisms
available.
Details
The SCSI Primary Command draft (SPC-3) defines commands common to all
SCSI devices. The SCSI Block Command draft (SBC-2) defines
commands used primarily by disks. The MultiMedia Command draft
(MMC-4) covers optical storage devices such as CD and DVD drives. The
Serial
Attached SCSI draft (SAS-1.1) covers a transport protocol that can
convey both SCSI
command sets (via SSP) and the ATA command set (via STP). In some cases
SCSI command sets are carried on ATA transports. For
example most CD/DVD drives are physically connected to an ATA bus
(transport) which uses its "Packet Interface" (hence ATAPI) to convey
the SCSI MMC set.
The power management state that a device is in depends on several
factors:
- ATA or SCSI commands sent to the device
- time since last media access; ATA has a standby timer and SCSI
has both idle and standby timers
- initial settings on the transport
Not all of the draft standards have the same set of power management
states (see table below). At least the naming of states seems to be
consistent.
SPC-3
|
SBC-2
SCSI disks
|
MMC
CD/DVDs
|
SAS (SSP)
|
(s)ATA
disks
|
Notes
|
Powered_on
|
Powered_on
|
|
|
|
"This state consumes zero time."
|
Active
|
Active
|
Active
|
Active
|
Active
|
Medium accessible with least
delay. Maximum (average) power requirement
|
Idle
|
Idle
|
Idle
|
Idle
|
Idle
|
Compromise between Active and
Standby
|
Standby
|
Standby
|
Standby**
|
Standby
|
Standby**
|
Medium typically stopped (spun
down). No initializing command
required before next media access (but it may need up to 30 seconds to
respond)
|
|
Stopped**
|
|
Stopped
|
|
Similar to Standby but an
initializing command [START STOP UNIT (start=1)] is required
|
|
|
Sleep
|
|
Sleep
|
Device reset or power cycle
needed before device will accept further commands
|
|
|
|
Active_Wait
|
***
|
A SAS link layer NOTIFY(ENABLE
SPINUP) is required (in SSP)
|
|
|
|
Idle_Wait
|
|
A SAS link layer NOTIFY(ENABLE
SPINUP) is required (in SSP)
|
Those states marked with "**" are the resultant power condition
state after a START STOP UNIT (start=0) SCSI command has been executed.
For (s)ATA devices the SCSI-ATA Translation draft (SAT at www.t10.org)
specifies a translation to the STANDBY ATA command in this situation.
The state marked with "***" is for SATA disks connected via the
SAS transport's STP. The bridge STP/SATA phy in an expander may
be held in SpinupHold state after power up. This will be reported in
the "negotiated physical link rate" field of a SMP DISCOVER response.
It is then up to a SMP application client to issue an SMP "phy control"
function to perform a link reset or a hard reset on the STP/SATA phy
which will result in the SATA disk spinning up. How this could be done
from SAT is currently unclear.
For SAS disks (connected via SSP) in Active_Wait or Idle_Wait state
a media access
command will result in a NOT READY sense key with an additional sense
code of LOGICAL UNIT NOT READY, NOTIFY (ENABLE SPINUP) REQUIRED. If the
SCSI subsystem in the host computer receives that sense data (or the
equivalent message from a SATA bridge via STP) then it needs to either:
- use some algorithm within the kernel to determine when to
instruct the SAS link layer in the HBA to issue one or more NOTIFY
(ENABLE SPINUP) primitives
- alert the user space, potentially via the hotplug mechanism
- in the case of a pass-through interface, pass back the sense data
to the user space application
Options 2 and 3 are only practical for control if some mechanism exists
for a user space application to instruct the SAS link layer in a SAS
HBA to issue one or more NOTIFY (ENABLE SPINUP) primitives.
There is not much information about what power state real world SAS
disks power up in. The Hitachi Ultrastar 15K147 SAS disk product manual
has a "RNOT" bit in the unit attention mode page (which is vendor
specific) for whether a NOTIFY (ENABLE SPINUP) is required or not. With
RNOT set
(the default) the disk powers up into ACTIVE_WAIT state (i.e. a NOTIFY
(ENABLE SPINUP) is
required), and if RNOT is clear then the disk powers up into ACTIVE
state. Some notes about the power management of this disk: it does not
implement the Idle condition timer and while it does implement the
standby condition timer, the minimum standby condition timer period is
60 minutes, irrespective of the value given to the Power Condition mode
page (via a MODE SELECT command). Perhaps Hitachi are concerned about
too many spin-down/spin-up cycles over the service life of the disk.
Enclosures holding SAS and SATA disks will most likely include SAS
expanders which are also capable of issuing the SAS link layer NOTIFY
(ENABLE SPINUP) primitives. Hence logic in an enclosure could control
the staggered powering up of disks. That could lead to some competition
between multiple initiators (in host computers) and enclosures for
spinning up disks.
Doug Gilbert (dgilbert@interlog.com)
Last updated: 21st November 2005