https://github.com/azuregreen/cache_simulator
A C++11 Based CDN cache simulator
https://github.com/azuregreen/cache_simulator
c-plus-plus-11 cache-policy cache-simulation cdn-cache
Last synced: 8 months ago
JSON representation
A C++11 Based CDN cache simulator
- Host: GitHub
- URL: https://github.com/azuregreen/cache_simulator
- Owner: AzureGreen
- License: mit
- Created: 2020-01-19T07:57:01.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-13T09:27:14.000Z (almost 6 years ago)
- Last Synced: 2025-03-28T19:50:05.413Z (12 months ago)
- Topics: c-plus-plus-11, cache-policy, cache-simulation, cdn-cache
- Language: C++
- Homepage:
- Size: 58.6 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CDN Cache Simulator
### Introduction
This project is the **cache simulation** part of the CDN cache offline analysis.
This CDN cache has a chunk storage feature that all files larger than 1 MB are split into multiple chunks at a granularity of 1 MB and parts smaller than 1 MB are divided at 32 KB. Each chunk is treated as a separate file. Therefore, this requirement was also followed when implementing this simulator.
The core part of this simulator contains the implementation of various common cache replacement algorithms, such as : `FIFO`, `LRU`, `2Q`, `MQ`, `SLRU`, `ARC`, `LIRS`, `Belady`, etc.
### Dependencies
Compiler: GCC 4.8.5+
Build System: CMake 3.9+
Third party libraries: Boost-static, (gflags, glog if not build `libreplace.so`, it is not necessary)
### Build
Generate makefile:
```shell
cd src && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release ..
```
Build:
```shell
make
```
### Usage
Because this is a custom simulation system, if you need to use it, you can change the part of the cache replacement algorithm get method and insert method to handle the file size according to your needs. This project only involves chunks with a size of 1 MB and chunks of 32 KB or less.