[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: HDD not spinning down



On Saturday 01 February 2003 20:00, Jeff wrote:
> I've been working on this issue for some time now.  I'm running a
> Testing system and I want to hard drive to spin down when it's idle.
> This worked nicely for me under Woody, but something has changed and I
> can't figure it out.
>
> I run noflushd, and when I set the idle time to 3 minutes, the HDD
> will spin down for about 1.5 minutes before spinning back up.  I've
> testing idle times of 5 minutes and more, but the HDD never spins
> down.
>
> I run a couple of scripts to see what files and directories are being
> accessed that are less that 5 minutes old:
>
> #!/bin/bash
> find / -mount -type f -mmin -5
> find /usr -mount -type f -mmin -5
> find /home -mount -type f -mmin -5
>
> #!/bin/bash
> find / -mount -mmin -5
> find /usr -mount -mmin -5
> find /home -mount -mmin -5
>
> and I always see the same files and dirs:
>
> /var/spool/postfix/public/pickup
> /var/spool/postfix/public/qmgr
> /var/spool/cups/certs
> /var/spool/cups/certs/0
>
> If I stop cups and postfix, noflushd will spin the hard drive down and
> it'll stay down for a good long time, till I start another program or
> something that accesses the drive.
>
> I've been looking at the config files for cups and postfix, but I
> haven't figured out what I might do to stop them from hitting the HDD
> so often.
>
> So now, to my questions:
>
> 1. What config changes might I make to help the situation?
>
> 2. If postfix can't be changed, what might replace postfix to solve my
>    problem?  I'm not so concerned about cups since I don't need to
>    print during the times I want the HDD to spin down, so I'll just
>    stop it.
>
> thanks,
> jc

There are many apps that write to /etc and /var areas. Most stuff written to 
/var/spool/ can probably be discarded after a reboot so you can create a RAM 
disk and relocate /var/spool to it. Some apps require to pre-create a 
directory structure (empty) first.
While you are at it you can also move:
	/tmp
	/var/run
to RAM disk as well.

Be careful when using -mtime or -mmin to determine the recently accessed 
file, as that would only return the recently "modified" files. You should 
probably use -atime and -amin because the disk would need to spin even when 
you are only reading.

Good luck,
Anh



Reply to: