On Wed, Sep 12, 2018 at 7:07 AM, robert engels <reng...@ix.netcom.com> wrote: > With the Azul VM (and I believe the G1 collector in Java), the VM is > definitely aware of memory pressure as it approaches the maximum limit - then > it will increase the concurrent GC activity trying to avoid a potential huge > pause if the limit was reached - so throughput is lowered. > > I would think the Go GC needs to do this as well in order to limit pause > times.
That does not sound precisely correct to me. The Go GC pause time is independent of the heap size, and I would expect that Java's pause time is as well. It's certainly true that Go could run the GC harder when coming closer to a memory limit, which will tend to starve the program, but it won't actually pause the program. As I mentioned earlier, though, when the program is coming close to its memory limits, it needs to react. If it's a network server, it needs to stop accepting new connections. If it has cached data, it needs to discard it. And so forth. The GC can try harder but if the program keeps allocating more memory there is nothing the GC can do to save it. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.