3 ms·
Interesting article--I'd love to see one just on GC. I just downloaded the latest node.js sources and v8 still has a call to CollectAllAvailableGarbage in a lo
by yanowitz 9y ago
Interesting article--I'd love to see one just on GC.
I just downloaded the latest node.js sources and v8 still has a call to CollectAllAvailableGarbage in a loop of 2-7 passes. It does this if a much cheaper mark-and-sweep fails. Under production loads, that would occasionally happen. This led to pause-the-world-gc of 3600+ms with v8, which was terrible for our p99 latency.
The fix still feels weird -- we just commented out the fallback strategy and saw much tighter response time variance with no increased memory footprint (RSS).
I never submitted a patch though because although it was successful for our workload, I wasn't sure it was generally appropriate (exposed as a runtime flag) and I left the job before I could do a better job of running it all down.
- tracker1 9y agoI've had a similar, but differing issue on a server that ran a lot of one-off node scripts for things ranging from ETL, or queue processing. I found that I wanted to force GC after every, or every N items, because the memory could bloat out a lot before GC would happen and pause for several seconds... or, potentially starving out peer processes. Fortunately, that was already in the box, though behind a runtime flag.