While I was watching noe of my cache take about 40 hours to do a dirty
re-load of the swaplog, it occured to me to ask:
Is there any reason it isn't done on a lazy basis?
I.e. there's a spare bit in the StoreEntry struct at the moment, so
mark it zero if the entry is tested valid, one if it's not.
Then in storeGet() (just for example. there may be a better place to
put this), do
if (bit == one) {
stat the file
check that it's really valid etc.
reset bit
}
Avantages:
You don't get abymsmal hit rates while it's reloading.
You don't stat a heap of objects that you may never touch
again (they'll expire never having been access again).
You don't get choke the disk system with all those stat()'s.
Disadvantages:
Ummmmm. :)
You no longer get a lower bound on performance???? (in theory,
you could get a lot of stat()'s going if lots of different objects are
touched fast?)
Any thing else I've missed?
Michael.
Received on Tue Jul 29 2003 - 13:15:42 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:24 MST