> > |
%META:TOPICINFO{author="MarcusWolschon" date="1018377005" format="1.0" version="1.1"}%
%META:TOPICPARENT{name="HowToS"}%
Things to do to minimize power-usage in Linux:
- use hdparm to spin down any mechanical HDD after a while
- use APM or ACPI if possible
- power serial-port atached hardware only while DTR is up
Minimising Spinup time
Many services continually write to or access the hard disk and prevent spindown from kicking in, or mean it spins up too frequently. Run just the services you need is always a good plan. Here are some services that I tamed.......
* syslogd - add "-m 0" to startup parameters, in /etc/init.d/sysklogd on debian, to prevent time stamps in syslog file.
* crontab - change entries to all run at aprox the same daily time. Change the daily, weekly and monthly run time to aprox. coincide. Here's my /etc/crontab
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
25 21 * * * root run-parts --report /etc/cron.daily
30 21 * * 7 root run-parts --report /etc/cron.weekly
35 21 1 * * root run-parts --report /etc/cron.monthly
Monitoring state of Harddisk
Use /sbin/hdparm hdparm -C /dev/hda | grep state to show active/spindown state.
But by executing /sbin/hdparm you've just spun the disk up :-)
You need a RAM disk populated with enough so that a chroot to the mount point of the ramdisk can execute enough to monitor the state of the disk.
See details and example scripts etc at http://www.comp.leeds.ac.uk/jj/linux/disklog.html
* atd - Don't run "at" jobs, for some reason they keep the disk active. Having the atd service running but no active "at" jobs seems fine.
* sendmail - Don't run it in daemon mode. Put an entry in /etc/inetd.conf so it only runs when needed......
#:MAIL: Mail, news and uucp services.
smtp stream tcp nowait root /usr/sbin/tcpd /usr/sbin/sendmail -bs
* named - Alter configuration to limit logging of stats etc, here's relevant bits from my named.conf
cleaning-interval 0;
heartbeat-interval 0;
statistics-interval 0;
dialup yes; notify no; forward only;
forwarders {
- 11.144.1;
};
listen-on port 53 {
- 0.0.1;
- 168.10.80;
};
// reduce log verbosity on issues outside our control
logging {
category lame-servers { null; };
category statistics { null; };
category cname { null; };
};
-- MarcusWolschon - 09 Apr 2002 |