richardartoul / nola

MIT License
74 stars 6 forks source link

Add file cache example #49

Closed richardartoul closed 1 year ago

richardartoul commented 1 year ago

This P.R adds an example application that acts as an in-memory cache of files (fetched from S3 or anywhere else). It is structured so that files are fetched and cached in chunks, and requests for a given file are always routed to the same actor/node so fetches for the same bytes ranges can always be deduplicated.

=== RUN   TestFileCacheBenchmark
2023/03/02 21:51:13 registering self with address: 127.0.0.1:9090
creating bench-actor file-cache
Inputs
    invokeEvery 250µs
    chunkSize 1048576
    fetchSize 16777216
    fileSize 268435456
    getRangeSize 1048576
    invokeEvery 250µs
Results
    numInvokes 56971
    invoke/s 3798.0666666666666
    numMiBs 59627
    MiB/s 3975.133333333333
    median latency 0
    p95 latency 2.9742334234767007 ms
    p99 latency 10.913817739716835 ms
    p99.9 latency 44.259778868332674 ms
    max latency 87.36537231979757 ms
--- FAIL: TestFileCacheBenchmark (17.04s)