DragonFly kernel List (threaded) for 2008-10
Re: HAMMER cleanup
> Generally speaking I think hammer cleanup should only be automated
> to the extent of being run as an overnight cron job.
> I would prefer *not* to run hammer cleanup on boot as doing so just
> hands us the same problem that background fsck has... it generates a
> lot of disk I/O just at the wrong time. Even though the cleanup runs
> for a limited period of time I still don't want it to run at boot.
> Booting and shutdown are also the most dangerous times for disk
> operations, mostly for laptops but also to some extent for desktops
> and servers. These are the times where users try new configurations,
> new kernels, where power fluctuations might be powering on a machine
> or a UPS might be trying to shut it down. It is during these periods
> when bad things are most likely to happen. We don't want to run
> hammer cleanup during these periods.
Agree; better safe than sorry!
> I would like to keep a solution for laptops separate from the solution
> for desktops. For desktops running overnight would do the trick. As
> an alternative the cron can run it hourly... 'hammer cleanup' keeps track
> of the time itself and by default will only do major work once a day,
> even if run hourly. I dunno how far we should go for the 2.2 release.
> Certainly it should at least be run overnight.
OK; will HAMMER be beta in 2.2?
In other words, which HAMMER uses would we like to be tested in 2.2?
> Laptops might need a 'cleanup' button. I just don't know when the best
> time to run hammer cleanup would be, or for how long. Desktops might
> make do with an hourly poke.
Ahh we just need an oracle.. A button is a sort of an oracle.
We will need user to set system type (eg. at install): laptop / desktop / server
(and describe what it is used for; eg. don't choose laptop if no GUI installed ;-)
For non expert user I think we need to do cleanup regularly without users
having to worry about it.
Maybe check hourly and do cleanup if more than 24h after last cleanup.
(activated by button press or whatever)
For me it works perfect to do hammer cleanup in background just after boot;
(and at night if boot hasn't happened that day (and system not turned off))
I have added a 5 minute delay before cleanup, after reading your advice above.
This has disk activity a lot like background fsck; important difference is that you can
just kill cleanup if you need disk BW for other uses.
This fit my use of FS as I normally finish some work/updating before turning off
system; so boot is a good time to do snapshot; and it is nice deterministic,
that disk will spin for some minutes at that time.
Can we use this scheme for desktop systems (not running at night)?
How much should we delay cleanup efter boot?
I would rather not like disk to spin hourly, as it will delay other disk bound operations.
If mini cleanup is to run hourly it could be done by having `hammer cleanup' use -t flag,
to override timeout in config file; also flag not to do snapshot could be added.
Anyway I think we should be able to choose *one* default cleanup strategy;
newbies won't have to worry and expert users will disable default and
impelment their own strategy anyway.