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

Re: modem works!, battery drains fast?



> > My guess is you have all sorts of funny daemons running that peek at the
> > disk every few seconds. With LinuxPPC I had to disable things like
> > icecast, crossfire, and I think even sendmail, before disk activity would
> > drop to a sane level.
> 
> I don't have any of these; would exim be a usual suspect as well?

Guess so - anything that reads or writes files (or directories) on a
regular basis is a candidate. Set the queue run interval to 1h to take
care of this. 
 
> > lsof +D /var should show some of the usual suspects.
> 
> That yields syslogd, cron, gdm, XFree86, gnome-pty-helper and lpd. I wouldn't
> suspect anyone but syslogd here, right?

lpd doesn't check the spool dir by itself. gdm and XFree86 are a must I
assume :-) Any cron jobs that run more often than every few minutes? 
 
> > If you can convince syslogd to write to the log less often this might help,
> > too.
> 
> How can I do that? I didn't see anything in the syslogd not syslog-ng
> manpages.

Seems like syslogd doesn't provide such an option... Log less, or log to a
remote host.
 
> > I didn't tweak any bdflush parameters (tried that before disabling the crazy
> > services and it didn't help).
> 
> Would that be via /proc/sys/vm/bdflush? What do the numbers mean?

Quoting the bdflush man page:

COMMAND-LINE OPTIONS
       -d   Display  kernel  parameters.   Using  this option prevents the daemon
            from starting.

       -h   Print the usage message (help).

       -s   If bdflush defaults to the old update behavior, call sync this often.
            ( In seconds ) Default:30.

       -f   Call flush this often. ( In seconds ) Default:5.

       -0   Max fraction of LRU list to examine for dirty blocks.

       -1   Max number of dirty blocks to write each time bdflush activated

       -2   Num of clean buffers to be loaded onto free list by refill_freelist

       -3   Dirty block threshold for activating bdflush in refill_freelist

       -4   Percentage of cache to scan for free clusters

       -5   Time for data buffers to age before flushing

       -6   Time for non-data (dir, bitmap, etc) buffers to age before flushing

       -7   Time buffer cache load average constant

       -8   LAV ratio (used to determine threshold for buffer fratricide)

Parameters 0-8 are the fields in the proc output (try update -d for an
annotated output format).

I'd try adjusting the -f and -s parameters for a start. 
 
> > And I don't get the disk to spin down all of the time...
> 
> BTW what would be considered a sane timeout for standby? Does it harm the disk
> if I set it to the minimum of 5 seconds and it gets powered down and back up
> all the time?

It may harm the disk, but it sure doesn't save any power. I'd try half a
minute or a minute as a minimum. 

	Michael



Reply to: