celestiaorg / celestia-node

Celestia Data Availability Nodes
Apache License 2.0
929 stars 925 forks source link

feat(share/eds/accessor_cache): rate limit cache rotation. #2606

Open walldiss opened 1 year ago

walldiss commented 1 year ago

Implementation ideas

eds accessor cache is limited in size by 128 items. Based on observations of BN, evection rate from cache could be quite high:

image

Such high rate of cache eviction causes several issues:

Solutions:

distractedm1nd commented 1 year ago

Removing cache is not that easy because we have to rethink where we are calling close. Also, it makes serving shrex for new blocks less efficient

distractedm1nd commented 1 year ago

We could, however, disable cache for blockstore only, so that the cache is only used for shrex eds requests. But this will probably noticeably damage LN sampling performance