Skip to content

Conversation

@bitfaster
Copy link
Owner

@bitfaster bitfaster commented Jul 13, 2022

When starting from an empty state, the warm queue is only populated when items are accessed more than once. The default partition now allocates 80% to warm. During warmup, the warm queue can stay empty and available capacity goes unused.

This PR uses a different strategy during warmup to fill the warm queue, enabling the cache to reach a full state.

@bitfaster bitfaster mentioned this pull request Jul 15, 2022
@bitfaster
Copy link
Owner Author

bitfaster commented Jul 15, 2022

This significantly improves hit rate

Glimpse

CacheSize ConcurrentLruHitRate ClassicLruHitRate
250 12.834580216126351 0.914380714879468
500 26.134663341645886 0.9476309226932668
750 39.43474646716542 1.14713216957606
1000 43.275145469659186 11.205320033250207
1250 49.925187032418954 21.24688279301746
1500 52.40232751454697 36.55860349127182
1750 53.49958437240233 45.03740648379053
2000 53.54945968412302 57.40648379052369

image

Arc Search (S3)

CacheSize ConcurrentLruHitRate ClassicLruHitRate
100000 9.630056664851665 2.3273947808169604
200000 18.70513616105412 4.631702842969722
300000 26.836933045224736 7.589191953876295
400000 34.39737021064863 12.038846146766927
500000 41.43631448206458 22.76700295995137
600000 48.27514541646356 34.630065806899715
700000 54.612297322318504 46.042754798935285
800000 61.295719534642934 56.599784662105634

image

Arc OLTP

CacheSize ConcurrentLruHitRate ClassicLruHitRate
250 15.629686756477366 16.473425988218498
500 27.128847174135394 23.445405269404745
750 32.290829135421625 28.28074320813438
1000 36.014417843996306 32.83089663018449
1250 38.6823753343288 36.209682271412085
1500 40.69409119997375 38.69604931383971
1750 42.47695934452412 40.7881681790088
2000 44.16925104879423 42.46973948334236

image

Arc Database

CacheSize ConcurrentLruHitRate ClassicLruHitRate
1000000 11.94732984541647 3.0858932571504036
2000000 23.242502873642838 10.744535536786323
3000000 36.190929184521515 18.5903853197138
4000000 39.605386837046645 20.244791789054513
5000000 45.15375010247688 21.031951531197397
6000000 50.37196791697349 33.95308575711706
7000000 56.082914488987626 38.8978587542623
8000000 61.00455968643755 43.03472380114861

image

@bitfaster bitfaster marked this pull request as ready for review July 17, 2022 00:02
@bitfaster bitfaster merged commit 102dce7 into main Jul 17, 2022
@bitfaster bitfaster deleted the users/alexpeck/warmup branch July 17, 2022 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants