[Mageia-discuss] How to prune urpmi-proxy cache?
alien at rmail.be
Mon Mar 12 21:05:22 CET 2012
Op maandag 12 maart 2012 10:59:37 schreef Morgan Leijström:
> måndagen den 12 mars 2012 07.49.42 skrev Maarten Vanraes:
> > I've been thinking along these lines:
> > 1) delete older versions of the same file in the same directories
> That is the best.
> ( I wonder if it shold be possible to keep old versions, but if any client
> needs it it will simply be downloaded again, and i guess it will not happen
> very often. skip list seems overkill. )
> > 2) give a configurable max size and delete the older files if the size is
> > reached
> Yes. Size per folder or whole urpmi-proxy, or both?
> > 3) give a configurable time limit and delete all files older than this
> > one (in a cronjob)
> That should be able to be set by folder, i.e i want to give mga1 2 years,
> (to facilitate new installs or reinstalls) but cauldron only a couple
> How would theese be combined?
> Idea to alow any content until max size is reached, and then prioritise:
> If size of folder is too large, then
> remove old versions until size is under limit
> if no more old versions, then
> remove eldest files until size is under limit
> Easiets to apply per folder only
> Will be complicated to apply globally
> Maybe by "outer control loop" that adjust down max size per folder if total
> limit is reached. )
> So if the OP suddenly realise he need more space for other thinks he can
> just adjust down urpmi-proxy max size and trigger the cleaning, and all he
> will get space easily, prioritising is taken care of.
> ... i will stop fantasising now...
I was rather thinking to have the old files removed on-demand...
ie: if you're requesting foo-2.3.4-5.mga2, i can safely remove foo-188.8.131.52mga2
in the same path. (if at all possible, maybe i would also try to remove
packages which are obsoleted by this package; but i donno if that's easily and
efficiently doable, though )
thus keeping everything nice and tidy.
about the other two parts, i didn't think about limiting it per folder or
something, it seems like quite some configuration to be done, and rather
i'll think about that later...
however, you did give me the idea that maybe it would be interesting to clean
older files in folders which have the highest request rates or maybe the most
recent request rates...
this would clean up older files which are not often requested in folders which
seem to update frequently, thus in folders which have the lowest cache-hit-
More information about the Mageia-discuss