config: Resource Cache Size Reduction
Summary
Branched off of #4296. This PR reduces the LRU resource cache + buffer channel size to 10k from 100k. This change was informed by an investigation into the current value that determined it was higher than necessary for mainnet, where the number of live apps is ~60k, as per metrica. The introduction of box storage also requires extra memory usage so freeing up resources is an added bonus. Note: that the maximum size of the cache may be slightly larger depending on the quantity of resources in the in-memory state deltas.
Test Plan
Performance tests are currently being executed to identify any performance degradation. The PR will be updated when the results are available.
Codecov Report
Merging #4311 (fba984d) into master (e4d6d42) will increase coverage by
0.04%. The diff coverage isn/a.
:exclamation: Current head fba984d differs from pull request most recent head c2acf87. Consider uploading reports for the commit c2acf87 to get more accurate results
@@ Coverage Diff @@
## master #4311 +/- ##
==========================================
+ Coverage 55.19% 55.24% +0.04%
==========================================
Files 398 395 -3
Lines 50165 50219 +54
==========================================
+ Hits 27689 27741 +52
+ Misses 20159 20100 -59
- Partials 2317 2378 +61
| Impacted Files | Coverage Δ | |
|---|---|---|
| config/localTemplate.go | 42.85% <ø> (ø) |
|
| ledger/acctupdates.go | 70.95% <ø> (+1.05%) |
:arrow_up: |
| logging/telemetryspec/metric.go | 57.69% <0.00%> (-21.94%) |
:arrow_down: |
| ledger/voters.go | 51.56% <0.00%> (-21.58%) |
:arrow_down: |
| data/txHandler.go | 0.00% <0.00%> (-11.12%) |
:arrow_down: |
| protocol/codec_tester.go | 0.00% <0.00%> (-10.00%) |
:arrow_down: |
| data/pools/transactionPool.go | 43.20% <0.00%> (-7.49%) |
:arrow_down: |
| data/transactions/transaction.go | 35.80% <0.00%> (-6.13%) |
:arrow_down: |
| data/transactions/logic/fields_string.go | 40.00% <0.00%> (-4.45%) |
:arrow_down: |
| data/accountManager.go | 67.08% <0.00%> (-4.17%) |
:arrow_down: |
| ... and 115 more |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Marked as draft to prevent accidental merge because we've agreed to hold on merging until after the upcoming consensus upgrade.
https://github.com/algorand/go-algorand/issues/4344 exists as visual reminder to revisit for merging.