Subject: Re: 1.4.1, APM, SCSI disk spin down how?
To: Ken Hornstein <>
From: Chris Tribo <>
List: current-users
Date: 07/26/2000 17:08:45
On Tue, 25 Jul 2000, Ken Hornstein wrote:
> The way that power management is done on IDE drives is simple; you
> send a command to the drives to tell it to spin down after N seconds
> of inactivity.  The drive wakes up when the operating system accesses
> the drive.  It's completely transparent to the operating system.
> Now, you _could_ make the operating system do the power management
> of IDE drives directly, and perhaps Windows does that.  But all of
> the free Unixes that I'm aware of simply let the drive do it, for
> better or for worse.

	Provided that all disk I/O is suspended somehow in the OS,
remember that Unices are running sync every 30 seconds or so. You might
want to check you're crontab and make sure that you can reasonably do
this on a system that doesn't have APM hardware. I have a Zenith 486 at
home that says it has APM, but it only works from BIOS. Looking at the APM
daemon code might be a place to start.
> So, what does this have to do with SCSI drives?  Well, AFAIK, SCSI
> drives don't have the feature of IDE drives that enables you to
> do the power management on the drive; you need to do it.

	No I don't think this is correct. Every Quantum HD I've used since
the 80MB SCSI-1 has an HD spin down time mode page. I usually set it to an
hour on my 68k Mac (Using FWB SCSI Configure) I seem to remember most
Seagate/Conner SCSI HD's also having the same thing. I can't speak for
Maxtor or IBM.

> But this
> presents a problem; you need to make the SCSI device driver aware of
> what you're doing, otherwise the operating system won't know that
> it has to turn on the drive when it goes to access it.  Thus, the
> work done on the i386 APM probably won't help you.

	I think there is a difference between the driving spinning down
via its own power management and issuing a stop-unit command. I belive
what you say is true if you use start/stop unit. If the drive powers
itself off, it will spin up as soon as the SCSI driver tries to do
anything other than poll its status.
> >Also, can someone confirm that SSS_START and SSS_STOP should indeed
> >cause the disks to spin up and spin down?  There's no documentation
> >(that I can find), even in the source itself.

	Yes, it does spin up/down. Stop unit is like unplugging the power
connector. Usually the logic will still identify the hardcoded drive
parameters and just wait for a start_unit. 

> This all ties back to the SCSI specification.  You really need to read 
> that to understand what that means (the short answer: "SSS_STOP may
> do what you want, it depends on the device").  You might want to
> read the SCSI specification.  It costs money to buy it from ANSI,
> but you can get the latest draft standard from them at:
> >From looking at it, it seems that newer drives support doing power
> management themselves, but I don't know how "new" they have to be.

	Anything Fast SCSI-2 or newer will probably have a P.M. mode
page. While NOT getting into an IDE vs. SCSI flame war, I have several DEC
DSPxxxx SCSI HS's that have been running 24/7 for about 8 years without
error, and I've had a WD 4GB Caviar and a 2GB Quantum viking die after 2
years which were spun up/down (both by head crashes). I guess I would ask
myself is power management going to save you as much money in power
savings as a new drive would cost (probably not with SCSI)

	On the flip side, what does the general population think about
creating a PI DPM (Disk Power Management?) daemon that works for non-APM
and/or non-i386 machines?