From: Michael Vrable Date: Thu, 21 Jun 2007 18:02:09 +0000 (-0700) Subject: Try an alternate segment cleaning ordering. X-Git-Url: https://git.vrable.net/?a=commitdiff_plain;h=09781648e4b608f546a0e9eca3c73b5ac9281a54;p=cumulus.git Try an alternate segment cleaning ordering. This one gives more weight to expiring nearly-empty segments. --- diff --git a/schema.sql b/schema.sql index 5017d9b..1a7e5ee 100644 --- a/schema.sql +++ b/schema.sql @@ -49,7 +49,7 @@ natural join -- Ranking of segments to be cleaned, using a benefit function of -- (fraction free space)*(age of youngest object). -create view cleaning_order as select *, (1-u)*age as benefit from +create view cleaning_order as select *, (1-u)*age/(u+0.1) as benefit from (select segmentid, cast(used as real) / size as u, julianday('now') - mtime as age from segment_info)