What exactly is --gc_interval, and what are the best practices for setting this value in production if the goal is to distinguish clearly between memory leaks and lazy garbage collection?
Heroku recommends setting --gc_interval=100 in their Node.js best practices documentation. However, I'm having trouble finding any official resources or documentation that explain the precise semantics of this parameter. 100 seems arbitrary.
I have even found this thread which says "--gc-interval is a debugging flag and not supposed to be used for production" but perhaps that is outdated since the thread is from 2016. This gist hosted by https://gist.github.com/listochkin says --gc_interval (garbage collect after allocations) type: int default: -1 but I have no idea who listochkin is.
What exactly is --gc_interval , and what are the best practices for setting this value in production if the goal is to distinguish clearly between memory leaks and lazy garbage collection?
I have tried searching for best practices and official documentation for --gc_interval but have been unable to find any.