I’ve studied this some more, and my thinking hasn’t changed much. I would support it over the current model, but would prefer something simpler.
In the EIP you report these (among other) times on an unknown, but fairly old CPU:
- Time to randomly read a byte from a 2MB range: 1.8ns
- Time to randomly read a byte from a 32MB range: 7ns
- Time to randomly read a byte from a 4GB range: 40ns
There is a big gap around 32MB, so we really need to have timings for the wider range of CPUs that will be running on the network in order to judge the minimum cache size to avoid thrashing. I propose to set the maximum allocation below the minimum thrashing range.
If we really want to charge warm reads less than cold reads then LRU eviction from the set of warm reads is a DoS surface. Me and Nick Johnson went over this years ago and decided the best policy was random eviction, which couldn’t be DoSed. But with the maximum allocation set to avoid thrashing all pages will be in cache. I propose to charge the same for warm and cold page access.