[LU-830] need to clean lbuild's reuse cache Created: 09/Nov/11  Updated: 29/May/17  Resolved: 29/May/17

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.1.0
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Brian Murrell (Inactive) Assignee: Brian Murrell (Inactive)
Resolution: Cannot Reproduce Votes: 0
Labels: None

Story Points: 3
Rank (Obsolete): 10511

 Description   

lbuild caches kernel and ofed build product. Currently that cache grows without any pruning. lbuild should do a pruning on each run to keep the amount of cache under control.



 Comments   
Comment by Minh Diep [ 01/Apr/16 ]

Brian, how do you think we should do that?

Comment by Brian Murrell (Inactive) [ 01/Apr/16 ]

mdiep: I don't remember the details of the cache TBH. But cache management is about removing the oldest, least used cache entries. There are tons of algorithms out there for doing so. But before you can even implement one of those you need to know when each item in the cache is used.

I have a faint recollection of there being a "last-used" indicator in each cache entry, such as touching a file when it was last used, etc. That at least gets you the oldest-used items. Maybe that is good enough. You just gather up all of those last-used markers and delete the entries that are the oldest.

But beware of incorrect algorithms. Algorithms based on time alone are usually wrong. i.e. "delete all entries older than xx days". A cache is at it's most effective when it's full. The only reason to remove entries is to make room for new entries. So an algorithm would be "I need to add a new entry, which is yy size big so I need to remove only enough of the oldest entries to free up yy space".

Comment by Andreas Dilger [ 29/May/17 ]

Close old ticket.

Generated at Sat Feb 10 01:10:49 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.