Open
Description
Checklist
- My issue is specific & actionable.
- I am not suggesting a protocol enhancement.
- I have searched on the issue tracker for my issue.
Description
In #8797 it happen often that bitswap use 20+Gigs of ram and will continue even after all requests has been canceled / finished.
However due to how golang GC's work, that lead to an accoutumance to high memory usage, and the GC wont get agressive to reclaim space.
(note the way the GC works, is that the GC tries to run when it is a factor X above the last GC size, so if your last size was 20Gig, golang might as well wait for 40gig of memory usage before gcing)
I belive lotus use https://github.com/raulk/go-watchdog to help in memory bursty conditions, maybe we should try it ? (I'm creating the issue to log any experiments)