项目作者: JYang1997

项目描述 :
Fast K-LRU Variable Object Size MRC Generation
高级语言: C
项目地址: git://github.com/JYang1997/KRR-stack-algorithm.git
创建时间: 2021-08-12T05:44:41Z
项目社区:https://github.com/JYang1997/KRR-stack-algorithm

开源协议:MIT License

下载


KRR Stack Algorithm

This is a new probabilistic stack algorithm named KRR which can be used to accurately model random sampling based-LRU under arbitrary sampling size K (K-LRU).

The KRR model is first described in:

Efficient Modeling of Random Sampling-Based LRU(ICPP’21)

The directory src/basic_version contains the basic model described in ICPP’21 paper.

The (src/KRR_mult_ops.c, inc/KRR_mult_ops.h) is the extended version of the original KRR model:

  • The new version support variable object size miss ratio curve generation while maintain same asymptotic complexity.
  • The new version support multiple different software cache commands includes: GET, SET, UPDATE, DELETE. (In contrast, the old version follows the original stack(cache) access definition).

compile and run example

create variable object size aware KRR

  1. make

create logic(uniform) object size KRR

  1. make UNIFORM=yes

How to use KRR for mrc generation

  1. {
  2. //k = k-lru's sampling size K
  3. //stack init
  4. KRR_Stack_t* stack = stackInit(k);
  5. while (workload_not_finished)
  6. {
  7. key = //key of current kv pair
  8. size = //size of current kv pair
  9. command = //"GET", "SET", "UPDATE", "DELETE"
  10. stack_distance = KRR_access(stack, key, size, command);
  11. //record stack distance
  12. }
  13. stackFree(stack);
  14. //generate MRC using stack distance distribution
  15. }

lib/src/spatial_sampling.c shows examples of how to feed spatially filtered traces to KRR model.