Skip to contentSkip to conversation

New SCSI subsystem in 2.4, and scsi idle patch

DISCUSSION Robert Love 2 participants 2 messages Sep 9, 2001 – Sep 10, 2001

lore
Share & tools
lore
#0 lore raw
Quoted 6 lines · Phillip Susi

P.S. I'd like to use a user mode daemon to detect disk idle, and issue the existing ioctl code to spin the disk down, and rely on the kernel to spin it back up as needed. Isn't there somewhere in /proc that keeps IO counters on the disk I can monitor? Also, is there a way I could ask the kernel to not flush dirty pages to disk unless it gets a whole lot of them so the disk won't be spun up all the time just to write a few KB?

You can change the behavior of how dirty pages are flushed using /proc/bdflush.

[18:41:55]rml@phantasy:/proc/sys/vm# cat bdflush 
30	64	64	256	500	3000	60	0	0

Of these 9 parameters, you probably care about the first and sixth. The first is percent of buffer full before bdflush kicks in and starts flushing. Setting this to 60% is fine, and will work towards your aim.

Note that, Documentation/sysctl/vm.txt is outdated (I will send a patch off...) this is the correct values of the fields on bdflush:

union bdflush_param {
	struct {
		int nfract;	/* Percentage of buffer cache dirty to 
				   activate bdflush */
		int dummy1;	/* old "ndirty" */
		int dummy2;	/* old "nrefill" */
		int dummy3;	/* unused */
		int interval;	/* jiffies delay between kupdate flushes */
		int age_buffer;	/* Time for normal buffer to age before we flush it */
		int nfract_sync;/* Percentage of buffer cache dirty to 
				   activate bdflush synchronously */
		int dummy4;	/* unused */
		int dummy5;	/* unused */
	} b_un;
	unsigned int data[N_PARAM];
} bdf_prm = {{30, 64, 64, 256, 5*HZ, 30*HZ, 60, 0, 0}};

Finally, I like your idea. I have an all SCSI system and would like my disks to spin down. Good luck.

Signature · 3 lines
Robert M. Love
rml at ufl.edu
rml at tech9.net
#1 lore raw
Quoted 1 line · Robert Love

(..details...)

Quoted 2 lines

Finally, I like your idea. I have an all SCSI system and would like my disks to spin down. Good luck.

I can only agree!
I sleep near a 4-disk-box, and it would be nice if i could spin down the disks at night...:-)

At the times of 2.0.xy, i also played around with the "scsi-idle"-package and it worked quite well...but i noticed one effect:
Since i used it the first time, one of my disks spinned down randomly....it stayed then still for about 10secs and started again...it had no effect on the system (not even a logentry), but it costed me a CD-R one time, and so i stopped using "scsi-idle".

I dont know if this was disk-dependant (the disk died some weeks ago after working for about 3 years, it could have been defect), but it started after the first use of "scsi-idle"...

But i would be glad to test a new version of "scsi-idle", if you write one...:-)

Solong..
Frank.

--
Frank Schneider, <[email protected]>.
Microsoft isn't the answer.
Microsoft is the question, and the answer is NO.
... -.-