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
fix: reduce API test memory consumption from 8.26GB to 1.57GB (#8263) (#9097)
* fix: reduce API test memory consumption from 8.26GB to 1.57GB (#8263)
Addresses excessive memory usage in API tests that consumed >40GB virtual memory and >6GB resident memory, causing slower test execution.
Root cause: Tests inherited production cache configurations (1GB local cache, 400MB SSTable cache) and ristretto's fixed 10M counter allocation created massive overhead for small test caches.
Changes:
- Set test-specific cache sizes (8MB local, 2MB SSTable) in serve_test.go
- Scale ristretto counters adaptively based on cache capacity in eviction.go
- Maintain full test functionality while reducing memory footprint by 81%
Before: 8.26GB total allocation (6.7GB from ristretto caches)
After: 1.57GB total allocation (50MB from ristretto caches)
Tests: All controller tests pass with identical functionality
* gofmt eviction.go
Force merge to bypass esti skip tests
---------
Co-authored-by: Barak Amar <[email protected]>
0 commit comments