You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Initial plan
* Add logo support to libCacheSim with placeholder image
Co-authored-by: 1a1a11a <8584783+1a1a11a@users.noreply.github.com>
* Replace logo.svg with logo.jpg and update README.md; remove obsolete assets README
* Update logo size in README.md for better visibility
* Refactor README.md: Remove obsolete table of contents and adjust logo alignment
* Cleanup README.md: Remove unused anchor tags for improved readability
* Refactor README.md: Remove duplicate logo section and add details for code examples
* Remove original title with logo plus text
* add circular logo
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: 1a1a11a <8584783+1a1a11a@users.noreply.github.com>
Co-authored-by: Juncheng Yang <1a1a11a@users.noreply.github.com>
Co-authored-by: Percy <xhc_1007@163.com>
***2024 Oct**: **S3-FIFO** gets an upgrade! Please try out the new version (the old is now renamed to S3-FIFOv0).
49
21
***2023 June**: **QDLP** is available now, see [our paper](https://dl.acm.org/doi/10.1145/3593856.3595887) for details.
50
22
***2023 Oct**: **[S3-FIFO](https://dl.acm.org/doi/10.1145/3600006.3613147)** and **SIEVE(https://sievecache.com)** are available! These are very simple algorithms that are very effective in reducing cache misses. Try them out in libCacheSim and your production!
51
23
***2024 Jan**: We compiled a list of open-source cache datasets at the bottom of this page
52
24
---
53
25
54
-
<!-- TOC --><aname="what-is-libcachesim"></a>
55
26
## What is libCacheSim
56
27
* a high-performance **cache simulator** for running cache simulations.
57
28
* a high-performance and versatile trace analyzer for **analyzing different cache traces**.
58
29
* a high-performance **library** for building cache simulators.
59
30
60
31
---
61
32
62
-
<!-- TOC --><aname="libcachesim-features"></a>
63
33
## libCacheSim features
64
34
***High performance** - over 20M requests/sec for a realistic trace replay.
65
35
***High memory efficiency** - predictable and small memory footprint.
@@ -71,7 +41,6 @@
71
41
***Efficient Miss Ratio Curve profiler** - quickly build highly accurate miss ratio curves on large-scale workloads; see [here](/doc/quickstart_mrcProfiler.md).
72
42
---
73
43
74
-
<!-- TOC --><aname="supported-algorithms"></a>
75
44
## Supported algorithms
76
45
cachesim supports the following algorithms:
77
46
### Eviction algorithms
@@ -103,9 +72,7 @@ cachesim supports the following algorithms:
libCacheSim uses [cmake](https://cmake.org/) build system and has a few dependencies: [glib](https://developer.gnome.org/glib/), [tcmalloc](https://github.com/google/tcmalloc), [zstd](https://github.com/facebook/zstd).
121
90
Please see [install.md](/doc/install.md) for instructions on how to install the dependencies.
122
91
123
92
124
-
<!-- TOC --><aname="build-libcachesim"></a>
125
93
### Build libCacheSim
126
94
cmake recommends **out-of-source build**, so we do it in a new directory:
127
95
```bash
@@ -137,10 +105,14 @@ cmake -G Ninja .. && ninja
137
105
[sudo] ninja install
138
106
popd
139
107
```
108
+
</details>
109
+
110
+
111
+
<details>
112
+
<summary> Developer setup </summary>
140
113
141
-
<!-- TOC --><aname="developer-setup"></a>
142
114
### Developer Setup
143
-
For developers, we provide tools to ensure code quality and consistent formatting:
115
+
If you contribute to libCacheSim, we provide tools to ensure code quality and consistent formatting:
144
116
145
117
#### Pre-commit Hooks
146
118
We provide a git pre-commit hook that runs linting checks before each commit, helping catch issues early:
@@ -157,22 +129,20 @@ The pre-commit hook:
157
129
- Prevents committing code with formatting, static analysis, or compiler issues
158
130
- Logs are preserved for debugging in `.lint-logs/` directory
Constructing fine-grained miss ratio curves for large-scale workloads is very demanding on CPU and memory resources. libCacheSim provides advanced miss ratio curves profiling tools to help you quickly build miss ratio curves for large-scale workloads. See [mrcProfiler](/doc/quickstart_mrcProfiler.md) for more details.
@@ -253,11 +218,13 @@ Constructing fine-grained miss ratio curves for large-scale workloads is very de
libCacheSim can be used as a library for building cache simulators.
259
223
For example, you can build a cache cluster with consistent hashing or a multi-layer cache simulator.
260
224
225
+
<details>
226
+
<summary> See a code example </summary>
227
+
261
228
Here is a simplified example showing the basic APIs.
262
229
```c
263
230
#include<libCacheSim.h>
@@ -299,13 +266,13 @@ To run the executable,
299
266
```bash
300
267
./test.out
301
268
```
269
+
</details>
302
270
303
271
See [here](/doc/advanced_lib.md) for more details, and see [example folder](/example) for examples on how to use libCacheSim, such as building a cache cluster with consistent hashing, multi-layer cache simulators.
### Extending libCacheSim (new algorithms and trace types)
310
277
libCacheSim supports *txt*, *csv*, and *binary* traces. We prefer binary traces because they allow libCacheSim to run faster, and the traces are more compact.
311
278
@@ -316,7 +283,6 @@ If you need to add a new trace type or a new algorithm, please see [here](/doc/a
316
283
We encourage the users to check [deepWiki](https://deepwiki.com/1a1a11a/libCacheSim) for a more detailed documentation.
317
284
318
285
---
319
-
<!-- TOC --><aname="python-package"></a>
320
286
## Python package
321
287
322
288
If you are not extremely sensitive to the performance, our python binding can offer you an easier way to access the core feature of libCacheSim.
@@ -340,6 +306,8 @@ print(f"Obj miss ratio: {obj_miss_ratio:.4f}, byte miss ratio: {byte_miss_ratio:
340
306
### Extending new algorithm
341
307
342
308
With python package, you can extend new algorithm to test your own eviction design **without any C/C++ compilation**.
In the [repo](/data/), there are sample traces in different formats (`csv`, `txt`, `vscsi`, and `oracleGeneral`). Note that the sampled traces are **very small** and __should not be used for evaluating different algorithms' miss ratios__. The full traces can be found either with the original release or the processed `oracleGeneral` format.
385
353
@@ -395,31 +363,22 @@ struct {
395
363
```
396
364
The compressed traces can be used with libCacheSim without decompression. And libCacheSim provides a `tracePrint` tool to print the trace in a human-readable format.
397
365
366
+
We provide a more comprehensive cache datasets at [https://github.com/cacheMon/cache_dataset](https://github.com/cacheMon/cache_dataset).
398
367
399
-
| Dataset | Year | Type | Original release | OracleGeneral format |
Among the large number of traces, I recommend using the newer ones from Twitter (cluster52), Wiki, and Meta.
410
368
411
369
412
370
---
413
-
<!-- TOC --><aname="contributions"></a>
414
371
## Contributions
415
372
We gladly welcome pull requests.
416
373
Before making any large changes, we recommend opening an issue and discussing your proposed changes.
417
374
If the changes are minor, then feel free to make them without discussion.
418
375
This project adheres to Google's coding style. By participating, you are expected to uphold this code.
419
376
420
377
---
421
-
<!-- TOC --><aname="reference"></a>
422
378
## Reference
379
+
<details>
380
+
<summary> Please cite the following papers if you use libCacheSim. </summary>
381
+
423
382
```
424
383
@inproceedings{yang2020-workload,
425
384
author = {Juncheng Yang and Yao Yue and K. V. Rashmi},
@@ -455,16 +414,16 @@ This project adheres to Google's coding style. By participating, you are expecte
455
414
numpages = {10},
456
415
}
457
416
```
458
-
If you used libCacheSim in your research, please cite the above papers. And we welcome you to send us a link to your paper and add a reference to [references.md](references.md).
417
+
If you used libCacheSim in your research, please cite the above papers.
418
+
419
+
</details>
459
420
460
421
---
461
422
462
423
463
-
<!-- TOC --><aname="license"></a>
464
424
## License
465
425
See [LICENSE](LICENSE) for details.
466
426
467
-
<!-- TOC --><aname="related"></a>
468
427
## Related
469
428
*[PyMimircache](https://github.com/1a1a11a/PyMimircache): a python based cache trace analysis platform, now deprecated
0 commit comments